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.
1
vote
0answers
53 views
How do you tell OpenGL ES 2.0 to use a texture as the depth buffer?
I want to render a scene with an outline post processing effect in OpenGL ES 2.0.
First I render all the opaque objects. Then I use a post processing shader
for silhouette detection that uses the ...
0
votes
0answers
76 views
How to copy depth buffer to CPU memory in DirectX?
I have code in OpenGL that uses glReadPixels to copy the depth buffer to a CPU memory buffer:
glReadPixels(0, 0, w, h, GL_DEPTH_COMPONENT, GL_FLOAT, dbuf);
How do I achieve the same in DirectX?
I ...
2
votes
1answer
122 views
Early Z-test / depth-test in DirectX 11
As a DirectX noob i'm trying to wrap my head around depth buffers and specifically how pixel shaders are called for obscured pixels.
From what i understand, the rasterizer calls the pixel shader for ...
3
votes
1answer
284 views
using heightmap to simulate 3d in an isometric 2d game
I saw a video of an 2.5d engine that used heightmaps to do zbuffering.
Is this hard to do? I have more or less no idea of Opengl(lwjgl) and that stuff.
I could imagine, that you compare each pixel ...
3
votes
0answers
71 views
How to pass depth buffer from OGRE to CUDA?
I am using OGRE for rendering some objects. At every frame, I would like to pass the resulting depth buffer to CUDA for running some kernels on it and computing a result.
How can I achieve this? How ...
2
votes
2answers
58 views
Direct3D9 depth write without depth test
In OpenGL and Direct3D11 depth write is disabled if depth test is disabled. To enable depth write with out depth test in gl you must enable depth test with depth func always.
OpenGL
Even if the ...
0
votes
0answers
76 views
Depth Test not working properly on Nvidia
So, I send a Development Test of my in-dev game to some friends, and they found out that the Depth Test in OpenGL does not work on Nvidia.
I use my own matrices and sent them to the shader, and at ...
5
votes
1answer
251 views
Slow glReadPixels
I have implemented a lense flare for my game, and it looks great.
The first draft used individual sprites each with its own draw call. This was very slow, so I reengineered it to use a single draw ...
2
votes
2answers
97 views
How scanline rendering finds an intersection with an object
I'm a newbie with graphics and after I read many articles on the web I still don't understand how in rasterizing from a pixel coordinate like (0;0) on the screen the intersection with an object (let's ...
0
votes
1answer
198 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
1answer
68 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
215 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 ...
3
votes
0answers
183 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
246 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
64 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 ...