Depth buffer stores a depth (z-coordinate) of a rendered pixel of a 3D scene. Depth buffer is used in Z-buffering (management of image depth coordinates). Because of this depth buffer is often called Z-buffer.
0
votes
1answer
74 views
How to update “dynamicVertexBuffer” correctly with “setdata” on XNA?
I developed a small 3d games xna and uses a "DynamicVertexBuffer" and "DynamicIndexBuffer" to store and draw my vertices. Everything works fine, but my problem is the "Update" function where I update ...
0
votes
0answers
30 views
Best approach to depth streaming via existing codec
I'm working on a development system (and game) intended for games set mostly in static third-person views. We produce our scenery by CG and photographic techniques. Our background art is rendered ...
1
vote
2answers
101 views
How to clear a buffer to 1.0 instead of 0.0 in OpenGL?
Using glClear() you can set the buffer specified by the parameter to 0.0. This is useful say if you want pixels not covered by models to be black. Because vec3(0.0, 0.0, 0.0) results in black.
But ...
1
vote
0answers
72 views
How do you display non-cutout transparent 2D textures with a depth buffer? (OpenGL)
I've been able to get my 2D renderer to display transparent cutout textures by testing the alpha of a fragment and discarding if it is less than 1 (or any fraction really). The problem is I want to ...
0
votes
1answer
116 views
Using depth buffer on a sprite
I am following this guide:
http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps
Trying to create a tiled map that also supports multiple layers. The guide says that a way is to use ...
1
vote
1answer
55 views
Drawing sprites messes up my model in XNA4
I have a model which draws correctly in XNA4.
However if I try to add a background image (or any sprite), the rendering of my model is messed up. There are two problems with the rendering
model is ...
0
votes
2answers
208 views
GLSL light coloring blocked surfaces
I have created a very simple lighting shader. It currently only supports point lights, but it lights up surfaces that are completely blocked from the light. I know why, but I want to know how I can ...
4
votes
1answer
92 views
Forcing early-z with raytracing
I'm working on a GLSL raytracer, and I need to be able to edit gl_FragDepth in the FS. However, doing so disables early-z culling. The scene is rendered front-to-back and the FS can only push points ...
2
votes
0answers
171 views
Annoying flickering of vertices and edges (possible z-fighting)
I'm trying to make a software z-buffer implementation (meaning no DirectX or OpenGL, only a 2D library, SDL to be precise), however, after I generate the z-buffer and proceed with the vertex culling, ...
-1
votes
1answer
238 views
Why distant objects are being drawn in front of close objects?
I am rendering two cubes in the space using XNA 4.0 and the layering of objects only works from certain angles.
Here is what I see from the front angle (everything ok)
Here is what I see from ...
3
votes
2answers
306 views
Scan-Line Z-Buffering Dilemma
I have a set of vertices in 3D space, and for each I retain the following information:
Its 3D coordinates (x, y, z).
A list of pointers to some of the other vertices with which it's connected by ...
7
votes
1answer
442 views
Depth interpolation for z-buffer, with scanline
I have to write my own software 3d rasterizer, and so far I am able to project my 3d model made of triangles into 2d space:
I rotate, translate and project my points to get a 2d space representation ...
2
votes
0answers
133 views
Get Specific depth values in Kinect (XNA)
I'm currently trying to make a hand / finger tracking with a kinect in XNA. For this, I need to be able to specify the depth range I want my program to render. I've looked about, and I cannot see how ...
2
votes
0answers
645 views
Using SpriteBatch with BasicEffects and layerDepth creates negative Z values?
Simply: Why don't all of these sprites draw? What do I need to do to make them draw?
I'm trying to use SpriteBatch.Draw with the layerDepth parameter to help reduce overdrawn. However I can't get it ...
3
votes
0answers
408 views
Copying render target texture loses all depth
I have a render target RenderTargetScene that holds my scene texture with the scene's depth buffer
rtScene = new RenderTarget2D(
graphicsDevice,
...