Stencil isn't working within `BufferedContainer`s
See original GitHub issueHow to reproduce: in the StencilTestScene
make StencilDrawable
a child of a BufferedContainer
. Result will look like Stencil was not applied at all.
Tested with LegacyGL and D3D, so it probably just isn’t handled by the BufferedContainer
implementation.
Issue Analytics
- State:
- Created 3 months ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
SOLVED** Help with applying stencil buffer to a problem
I'm currently attempting to use the stencil buffer to correctly clip nested rectangles when drawn to the screen.
Read more >Stencil Buffer Overlapping
Hello, I have 2 shaders that use stencil buffer. The first shader is a mask with these settings (a plane) - Reference =...
Read more >opengl - Stencil buffers seem to not work properly
I am writing an SDL2/modern OpenGL application that uses stencil buffers. I have written the following code in my renderer:
Read more >LearnOpenGL - Stencil testing
Stencil buffer operations allow us to set the stencil buffer at specific values wherever we're rendering fragments. By changing the content of the...
Read more >Help understanding the gl stencil buffer
A while ago I used stencils to crop an image to a circle in minecraft. Recently I tried to use the same code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t know why you’re restating what I’m saying. Please read over again because I’m not questioning you, I’m making a declaration and/or agreeing with your proposal (1).
Looks like I wasn’t clear enough: I’m not applying stencil to the buffered container. It’s the drawable within the buffered container which contains stencil isn’t being rendered.
Screenshot 1: using your proposal Main buffer works as expected, but effect buffers are empty. That’s because they are now have this format too due to how
BufferedDrawNodeSharedData
is implemented (it’s using provided format for Main end Effect buffers).Screenshot 2: changing
BufferedDrawNodeSharedData
implementation so Effect buffers don’t use provided format fixes the issue.My proposals:
BufferedDrawNodeSharedData
so that providedRenderBufferFormat
isn’t applied to the Effect buffers.RenderBufferFormat[]
parameter which will be used only by effect buffersThat’s the best I can do to describe the issue. Next step would be just making a pr with test scene attached.