Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [stencil-test]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
52 views

Are stencil buffer dimensions required to match render target dimensions?

I may not need as precise pixel-perfect stenciling as my render target during stencil tested render pass. I could be okay with stencil test happening at half or quarter of resolution to save bandwidth,...
1 vote
1 answer
258 views

Is it possible to fill in Stencil Buffer programmatically via fragment shader?

I've never worked with stencil buffers, but I'm researching if it is the right tool for my task. Basically I don't understand yet if stencil buffer can only be filled in by some hardcoded rules during ...
6 votes
1 answer
267 views

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 ...
5 votes
1 answer
584 views

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 ...
2 votes
3 answers
582 views

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 ...
5 votes
1 answer
108 views

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 (...
6 votes
0 answers
128 views

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 ...
12 votes
2 answers
863 views

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