Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): explicitly set clearStencil in LayersPass #8844

Merged
merged 1 commit into from Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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