Skip to content

Commit

Permalink
WebXR: check for null render target (#15) (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
idrisshah authored and dmarcos committed Nov 8, 2024
1 parent 84c77a3 commit aa31cd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2305,7 +2305,7 @@ class WebGLRenderer {

renderTargetProperties.__autoAllocateDepthBuffer = depthTexture === undefined;

if ( ! renderTargetProperties.__autoAllocateDepthBuffer && ! _currentRenderTarget.isWebGLMultiviewRenderTarget ) {
if ( ! renderTargetProperties.__autoAllocateDepthBuffer && ( ! _currentRenderTarget || ! _currentRenderTarget.isWebGLMultiviewRenderTarget ) ) {

// The multisample_render_to_texture extension doesn't work properly if there
// are midframe flushes and an external depth buffer. Disable use of the extension.
Expand Down

0 comments on commit aa31cd4

Please sign in to comment.