Skip to content

Commit

Permalink
fix(core): explicitly set clearStencil in LayersPass (#8844)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Apr 26, 2024
1 parent 827161b commit ab3b018
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/core/src/passes/layers-pass.ts
Expand Up @@ -66,6 +66,7 @@ export default class LayersPass extends Pass {
const clearCanvas = options.clearCanvas ?? true;
const clearColor = options.clearColor ?? (clearCanvas ? [0, 0, 0, 0] : false);
const clearDepth = clearCanvas ? 1 : false;
const clearStencil = clearCanvas ? 0 : false;
const colorMask = options.colorMask ?? 0xf;

const parameters: RenderPassParameters = {viewport: [0, 0, width, height]};
Expand All @@ -80,7 +81,8 @@ export default class LayersPass extends Pass {
framebuffer: options.target,
parameters,
clearColor,
clearDepth
clearDepth,
clearStencil
});

try {
Expand Down

0 comments on commit ab3b018

Please sign in to comment.