Przeglądaj źródła

WebGPURenderer: Fix stencilBack not matching stencilFront in pipeline (#33002)

Jeremy Tribby 3 miesięcy temu
rodzic
commit
e075535289

+ 1 - 1
src/renderers/webgpu/utils/WebGPUPipelineUtils.js

@@ -250,7 +250,7 @@ class WebGPUPipelineUtils {
 			if ( renderStencil === true ) {
 
 				depthStencil.stencilFront = stencilFront;
-				depthStencil.stencilBack = {}; // three.js does not provide an API to configure the back function (gl.stencilFuncSeparate() was never used)
+				depthStencil.stencilBack = stencilFront; // apply the same stencil ops to both faces, matching gl.stencilOp() which is not face-separated
 				depthStencil.stencilReadMask = material.stencilFuncMask;
 				depthStencil.stencilWriteMask = material.stencilWriteMask;
 

粤ICP备19079148号