Questions tagged [stencil-test]
6 questions
12
votes
2 answers
Is it possible to find out how many fragments made it through the stencil test?
I have an OpenGL application which uses stencil tests quite extensively to render irregular shapes (a bit like a simple 2-D CSG). If I could find out how many fragments passed the stencil test and were actually rendered, this would be very helpful…
Martin Ender
- 2,700
- 4
- 22
- 45
6
votes
1 answer
Do occlusion queries respect the stencil test at all?
In a project where I want to select visible objects using using a screen-aligned polygon and various conditions for what "selected" means with regards to that polygon, I'm basically drawing the polygon into the stencil buffer and then drawing the…
Christian Rau
- 1,604
- 11
- 32
6
votes
0 answers
How much processing power does stenciling actually save?
For example, let's assume I'm rendering cascaded shadow mapping, but for whatever reason, instead of one of the typical approach, I do the following:
Render the lowest resolution shadowmap
Copy part of the shadowmap to the next shadowmap, covering…
Llamageddon
- 881
- 2
- 7
- 13
5
votes
1 answer
Do stencil tests use any acceleration techniques?
Stencil bits are often used for optimizations, for instance having full screen lighting passes only affect certain pixels.
Does the stencil test mechanism use any acceleration structures of any kind (like maybe dividing the screen into a coarser…
Alan Wolfe
- 7,711
- 3
- 29
- 72
5
votes
1 answer
Honouring Depth Test with Stencil Test
I'm using OpenGL's stencil test to carve out a semicircular hole in a transition frustum with a cylinder oriented perpendicularly. However as one can see below, while this objective is achieved, the cylinder is still visible through the frustum…
Sharat V Chandrasekhar
- 261
- 2
- 8
2
votes
3 answers
Fast clipping without clearing stencil buffer
I'm writing an OpenGL application that runs on a Raspberry Pi, i.e., a quite resource-limited system. Essentially, a few quads with RGBA textures are overlayed/alpha blended on top of each other with individual translation/rotation applied. They are…
Jonas Mechtheim
- 45
- 4