Skip to content

Commit 1d075ce

Browse files
idrisshahdmarcos
authored andcommitted
WebXR: check for null render target (#15) (#17)
1 parent 749ae4b commit 1d075ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderers/WebGLRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2306,7 +2306,7 @@ class WebGLRenderer {
23062306

23072307
renderTargetProperties.__autoAllocateDepthBuffer = depthTexture === undefined;
23082308

2309-
if ( ! renderTargetProperties.__autoAllocateDepthBuffer && ! _currentRenderTarget.isWebGLMultiviewRenderTarget ) {
2309+
if ( ! renderTargetProperties.__autoAllocateDepthBuffer && ( ! _currentRenderTarget || ! _currentRenderTarget.isWebGLMultiviewRenderTarget ) ) {
23102310

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

0 commit comments

Comments
 (0)