Questions tagged [depth-buffer]

Depth buffering(Z-buffering), is the management of image depth coordinates in three-dimensional (3-D) graphics.

In computer graphics, z-buffering, also known as depth buffering, is the management of image depth coordinates in three-dimensional (3-D) graphics, usually done in hardware, sometimes in software. It is one solution to the visibility problem, which is the problem of deciding which elements of a rendered scene are visible, and which are hidden. The painter's algorithm is another common solution which, though less efficient, can also handle non-opaque scene elements.

Resources

439 questions
0
votes
1 answer

passing depth buffer

So I'm reading a paper on a particular shading algorithm and there is one section that seems a bit vague and I was wondering if I could get advice here. Basically it says I first have to take a 3D vertex of a mesh and transform it to window…
user1782677
  • 1,693
  • 4
  • 22
  • 44
0
votes
1 answer

Depth texture and fbo issues on opentk c# with intel hd 3000

I'm currently facing a problem with intel hd graphics hardware to implement shadow mapping effects. I think that the code isn't far from what i want to have as results because this code snippet works fine on ATI Mobility Radeon 5650 and Nvidia NVS…
nabil
  • 21
  • 1
  • 3
0
votes
0 answers

glEnable(GL_DEPTH_TEST) - not rendering anything

im working on a project to learn to render 3d shapes. to get the depth right i am trying to use glEnable(GL_DEPTH_TEST). as expected it will not render anything with ony that addition so i added glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT),…
0
votes
1 answer

Introducing a depth buffer to a renderer that uses multiple vertex array objects

I have a rendering infrastructure that uses multiple vertex array objects to render a complex scene. Each vertex array object is responsible for maintaining its own set of bound buffers, pointers and attributes (as they are designed to do). Given…
user236520
0
votes
1 answer

OpenGL depth texture artifacts

I'm implementing shadow mapping for my little 3d engine. However, there seem to be artifacts in the depth texture, which can be seen by using the texture and observing the shadows, or drawing the depth texture on a quad. Here is what the depth…
0
votes
0 answers

OpenGL ES 2.0 plane morph/distortion effect GPUImage iOS

was playing a bit with awesome GPUImage framework and was able to reproduce some "convex"-like effects with fragment shaders. However, I'm wondering if it's possible to get some more complex plane curving in 3D using GPUImage or any other OpenGL…
0
votes
2 answers

Render 2D image (with depth) in OpenGL preserving depth testing

I have an image from an external source (say a software ray tracer) that also has a depth buffer. I want to render that image in an OpenGL scene (which contains several other 3D objects) such that the OpenGL depth buffer is correctly updated, i.e.…
porst17
  • 387
  • 3
  • 14
0
votes
2 answers

What is wrong with my Z-buffer calculations?

I am implementing a Z-buffer to determine which pixels should be drawn in a simple scene filled with triangles. I have structural representations of a triangle, a vertex, a vector (the mathematical (x, y, z) kind, of course), as well as a function…
norman
  • 4,280
  • 10
  • 38
  • 72
0
votes
0 answers

How to create a depth texture on iOS6. Is R16F an option?

I am trying to write depth to a texture. I would like to have the linear depth, so I tried using I tried using a R16F texture. I defined a texture like this: glTexImage2D(GL_TEXTURE_2D, 0, GL_R16F_EXT, g_bufferWidth, g_bufferHeight, 0, …
endavid
  • 1,580
  • 14
  • 36
0
votes
1 answer

glreadpixel gl_depth_component returns 0?

I am looking for a solution to intersection point of a cube and a line. So i used GLES20.glReadPixels(touchX, touchY, 1, 1, GLES20.GL_DEPTH_COMPONENT, GLES20.GL_FLOAT, zz); and i showed the zz , but result was 0. so how could i get the depth…
0
votes
1 answer

How to get previous value in depth buffer?

How I can to do the next algorithm? : if(Color.a < 0.9) gl_FragDepth = gl_PrevFragDepth; else gl_FragDepth = gl_FragCoord.z; This I can make with glDepthMask(false);, but it's working with polygons which have all pixels with alpha < 1. If…
0
votes
1 answer

How do I depth-test for a certain range?

What is the most common/simplest/fastest way to depth-test for a certain range? pass if (currentDepth-offset < newDepth && newDepth < currentDepth) currentDepth := value in the depth buffer offset := constant (know at compile-time and for all…
Fabian
  • 1,862
  • 3
  • 23
  • 34
-1
votes
1 answer

Depth Buffer in MATLAB

I am trying to reconstruct world coordinates from the depth buffer in MATLAB and was wondering if someone could please help me figure out a way to get depth buffer values from a rendered image in MATLAB as there are no built-in functions that can…
snkhan42
  • 1
  • 1
-1
votes
1 answer

Detecting when there is no geometry at a pixel location when reconstructing depth

I'm reconstructing the fragment position from a depth texture to perform lighting calculations efficiently. The problem is that in areas with no geometry (for example the floor, ceiling, and window in the image below) the fragment output colour is…
livin_amuk
  • 1,043
  • 8
  • 23
-1
votes
1 answer

Depth image webgl

I want to draw just the depth image without any color in the following manner: Is this possible? If so, can someone point me to the correct resource to get this information or give a basic explanation about the same?
userJS
  • 99
  • 1
  • 10
1 2 3
29
30