question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stencil isn't working within `BufferedContainer`s

See original GitHub issue

How 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:closed
  • Created 3 months ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
smoogipoocommented, Jun 23, 2023

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).

0reactions
EVAST9919commented, Jun 23, 2023

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:

  1. Changing BufferedDrawNodeSharedData so that provided RenderBufferFormat isn’t applied to the Effect buffers.
  2. Adding additional RenderBufferFormat[] parameter which will be used only by effect buffers

That’s the best I can do to describe the issue. Next step would be just making a pr with test scene attached.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found