From 95d576ba224c3db326eb4d47b3f3cd812fe6b9c5 Mon Sep 17 00:00:00 2001 From: aardgoose Date: Mon, 29 Jan 2024 17:07:45 +0000 Subject: [PATCH] remove accidentally duplicated code and fix warnings --- examples/jsm/renderers/common/RenderContexts.js | 4 ++-- examples/jsm/renderers/common/Renderer.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/jsm/renderers/common/RenderContexts.js b/examples/jsm/renderers/common/RenderContexts.js index 9b341a96476285..3f556f214df5f2 100644 --- a/examples/jsm/renderers/common/RenderContexts.js +++ b/examples/jsm/renderers/common/RenderContexts.js @@ -9,7 +9,7 @@ class RenderContexts { } - get( scene, camera, renderTarget = null ) { + get( scene, camera, renderTarget ) { const chainKey = [ scene, camera ]; @@ -51,7 +51,7 @@ class RenderContexts { } - if ( renderTarget !== null ) renderState.sampleCount = renderTarget.samples === 0 ? 1 : renderTarget.samples; + if ( ! renderTarget.isCanvasRenderTarget ) renderState.sampleCount = renderTarget.samples === 0 ? 1 : renderTarget.samples; return renderState; diff --git a/examples/jsm/renderers/common/Renderer.js b/examples/jsm/renderers/common/Renderer.js index e6083e7ab210b5..a9b3213081792c 100644 --- a/examples/jsm/renderers/common/Renderer.js +++ b/examples/jsm/renderers/common/Renderer.js @@ -418,7 +418,6 @@ class Renderer { renderContext.height = renderTargetData.height; renderContext.depth = renderTarget.depthBuffer; renderContext.stencil = renderTarget.stencilBuffer; - renderContext.sampleCount = renderTarget.samples === 0 ? 1 : renderTarget.samples; }