|
|
@@ -1080,7 +1080,7 @@ class WebGPUBackend extends Backend {
|
|
|
*/
|
|
|
draw( renderObject, info ) {
|
|
|
|
|
|
- const { object, context, pipeline } = renderObject;
|
|
|
+ const { object, material, context, pipeline } = renderObject;
|
|
|
const bindings = renderObject.getBindings();
|
|
|
const renderContextData = this.get( context );
|
|
|
const pipelineGPU = this.get( pipeline ).pipeline;
|
|
|
@@ -1189,6 +1189,15 @@ class WebGPUBackend extends Backend {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // stencil
|
|
|
+
|
|
|
+ if ( context.stencil === true && material.stencilWrite === true && renderContextData.currentStencilRef !== material.stencilRef ) {
|
|
|
+
|
|
|
+ passEncoderGPU.setStencilReference( material.stencilRef );
|
|
|
+ renderContextData.currentStencilRef = material.stencilRef;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
// draw
|
|
|
|
|
|
const draw = () => {
|