-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Renderer: Set stencil to false by default.
#27900
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
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
No, this change looks fine. No WebXR browser implementations use the stencil buffer so it's ok to disable by default. |
|
/fyi @sunag @RenaudRohlinger |
|
Should we also consider eliminating the clear stencil operation? Given that the stencil buffer is now disabled by default, its clear operation appears unnecessary in both WebGLRenderer and WebGPURenderer. Additionally, should we default |
That sounds good. We can do this by evaluating the
Sounds good to me as well. We should only keep in might that @RenaudRohlinger Would you file a PR with your suggested changes? |
|
Ok will do! |
Related issue: #27799
Description
As suggested in #27799 (comment), the
stencilparameter ofWebGLRendererand the newRenderer.stencilproperty are nowfalseby default. That means applications have to set the value totruenow if they rely on stencil related logic.The motivation behind this change is to only request resources if they are required. Since
stencilis only used in special circumstances, the new default value seems more appropriate.Note: Not enabling stencil for the default drawing buffer does not exclude depth textures or render targets of having stencil types/formats or attachments.
@cabanier I've seen
WebXRManageralso evaluates thestencilproperty for its layer related logic. Do you see any issues with this change?