Skip to content

Commit

Permalink
WebXR: check for null render target (supermedium#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
idrisshah committed Jan 18, 2024
1 parent 44fd0d6 commit 2af611d
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 @@ -2216,7 +2216,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 2af611d

Please sign in to comment.