Questions tagged [stencil-buffer]

The stencil buffer is a concept implemented in various 3D graphics APIs used for performing "stencil" operations, used to minimize rasterization of hidden pixels or to implement various effects.

Resources:

202 questions
0
votes
1 answer

How to set outline for stencil DirectX 11

I'm pretty new to DirectX and graphics coding. I'm using SlimDX for implementation. I'm drawing a map that shows a visual representation of data for a particular area. All I want to do is take a state shape, and if a pixel is within that area, draw…
KairisCharm
  • 1,363
  • 1
  • 13
  • 32
0
votes
1 answer

No transparency with simple OpenGL ES2.0 stencils

I am attempting to make a stencil mask in OpenGL. I have been following the model from this source (http://open.gl/depthstencils and more specifically, http://open.gl/content/code/c5_reflection.txt), and as far as I can tell, I have followed the…
Chet
  • 1,209
  • 1
  • 11
  • 29
0
votes
2 answers

Custom drawing order for AR overlay effects in OpenGL ES (10)

I am working on a augmented reality application and need to sort the rendering of three different kinds of geometry. Level 1 Background geometry. This is a set of triangles that represent basic architecture. Walls etc. Level 2 Photograph plane. A…
J-S
  • 425
  • 3
  • 17
0
votes
0 answers

Stencilling a render onto an unknown curved surface

Wanting to decal multiple irregular textures onto a curved surface (mesh with xyz vertices and uv specified at each). I am loading the mesh from a model file, and don't have any a priori knowledge of the surface... all we know is that it will have a…
0
votes
0 answers

Identifying Polygons Checked in Depth Test (DX11)

I'm a fairly extreme newbie to the world of graphics programming, so forgive me if this question has an obvious answer, but I haven't managed to track it down. When the depth test is being performed in DirectX 11, how do you identify which triangles…
0
votes
1 answer

webgl drawing order, stencil buffer

I'm reading through learningwebgl.com and what confuses me is that it draws the first buffer I bound as last element? http://jsfiddle.net/Cx8gG/1/ red triangle green square blue square I expected to see only the blue square because everything else…
supernova
  • 3,814
  • 3
  • 22
  • 37
0
votes
1 answer

XNA, alpha testing, stencil buffer and two different projections

My question is about using the stencil buffer from another projection as a mask in another projection. I'm not sure how to approach this, so I'll go ahead and lay down some code: spriteBatch.Begin(SpriteSortMode.Deferred, null,…
Muhwu
  • 1,151
  • 1
  • 10
  • 26
0
votes
2 answers

Stencil Buffer & Stencil Test

according to the books that i've read stencil test is achieved by comparing a reference value with that of the stencil buffer corresponding to a pixel, how ever in one of the books it states that: A mask is bitwise AND-ed with the value in the…
BulBul
  • 1,159
  • 3
  • 24
  • 37
0
votes
2 answers

What's wrong with this simple OpenGL/JOGL stencil test?

I'm learning how to use a stencil buffer, but so far have been unsuccessful at getting a even a simple example to work. In fact, despite trying various combinations of parameters for glStencilOp and glStencilFunc I have not been able to see any…
martinez314
  • 12,162
  • 5
  • 36
  • 63
0
votes
2 answers

Opengl Stencil Buffer set when not transparent

I was trying to configure my stencil buffer so that, when enabled, it would set when the pixel drawn is not transparent (thus creating a map of pixels that light can collide with). What I've done is: glClearStencil(0); //clear stencil …
Luan Nico
  • 5,376
  • 2
  • 30
  • 60
0
votes
0 answers

OpenGL, deferred shading, bounding volume for point light and stencil pass, light attenuation

Currently I'm trying to implement deferred shading in my engine. I mostly based on one tutorial founded in web (I don't paste link here due to links limitation :)) but I also use another sources and I know how deferred shading works. My current…
0
votes
1 answer

DirectX - Deferred Shading w/Instanced Stencil Volumes

I'm creating a graphics application using DirectX9 using DXUT. In my application I would like to implement deferred shading. This method of lighting requires that I render a stencil volume( mask ) for each light within the scene. To avoid rendering…
P. Avery
  • 779
  • 1
  • 16
  • 34
0
votes
1 answer

Correctly use stencil_texturing in OpenGL

I am trying to implement the stencil_texturing extension of OpenGL as a proof of concept. My video card supports up to GL 4.3 so stencil_texturing is available to me. If more clarification is necessary here is the spec provided:…
zberry92
  • 43
  • 4
0
votes
0 answers

OpenGL, offscreen hard shadows calculation with stencil

I am trying to figure it out if and how would be possible to calculate hard shadows from multiple light-sources off-screen. preamble: scene is very complex, up to several million of triangles, up to hundred different light-sources, lights, material…
elect
  • 6,765
  • 10
  • 53
  • 119
0
votes
0 answers

opengl stencil buffer multiple simultaneous uses

I've managed to successfully use OpenGL's stencil buffer for a single instance in a scene. However, I'm unsure of how to use it in two different places in the same scene. Defining two stencil shapes in sequence prevents either from working, and my…
user1986358
  • 81
  • 2
  • 9
1 2 3
13
14