Questions tagged [stencil-buffer]
The stencil-buffer tag has no usage guidance.
12 questions
1
vote
0
answers
53
views
How can I accumulate past 256 in a framebuffer texture?
As a way to estimate screenspace density of a set of particles, I'm trying to do some splatting: render a circle of fixed radius around each particle, accumulating, to get a count of how many ...
0
votes
1
answer
78
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
609
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 ...
1
vote
1
answer
509
views
Problem using Decaling with Stencil to avoid Z-fighting
I need to create a decaling into a surface like a mesh, and to avoid Z-fighting I've been using Stencil Buffer to Turn-off depth test and make the decaling over the surface the Stencil Op permits. In ...
3
votes
1
answer
909
views
Layer rendering in Vulkan
I am writing a Vulkan video manipulation engine which has the following layers:
Foreground (2D)
Scene (3D)
Background (2D)
Note that each layer may have multiple objects, some of which may be ...
1
vote
0
answers
551
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 ...
2
votes
3
answers
652
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 ...
8
votes
2
answers
4k
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
0
answers
218
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
1
answer
512
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'...
6
votes
0
answers
130
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 ...
40
votes
3
answers
22k
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 ...