Questions tagged [stencil-buffer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
306 views

3D model outline using stencil buffer

I'm trying to outline a 3D model in WebGL. I've tried using a stencil buffer techique with glLineWidth and glPolygonMode. However, Mozilla's WebGL reference says that the minimum and maximum widths of ...
3
votes
3answers
205 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
2answers
2k views

Uses for Stencil Buffer

I've been doing OpenGL tutorials using LearnOpenGL. Currently I'm reading about Stencil Buffers and in his example he uses a Stencil Buffer to draw an outline around an object. I've also read that it ...
4
votes
0answers
167 views

selectively setting stencil value based on vertex property in vertex shader

Just like the question says. Is it possible to selectively set the value of the stencil buffer based on a property of a vertex, like the value of its normal, during its vertex processing phase? ...
3
votes
1answer
321 views

Incorrect values written in stencil buffer

I am trying to pick objects on mouse click. For this I have followed this tutorial, and tried to use the stencil buffer for this purpose. Inside "game" loop I am trying to draw 10 (5 pairs) 'pick'...
5
votes
0answers
120 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 ...
23
votes
3answers
7k views

What is a stencil buffer?

Wikipedia states that a stencil buffer is some arbitrary buffer a shader can use. However, it hints that it's used for clipping, or otherwise "tightly binding" the depth and pixel buffers, slightly ...