Tag Info

New answers tagged

1

The Z coordinate has a different meaning when we're talking about viewport coordinates. In most vertex shaders, at some point you are multiplying each vertex by a projection matrix in order to convert world coordinates into viewport coordinates. After leaving the vertex shader, each vertex will be then divided by the W value. The resulting value is now in ...


0

Not sure if you've heard about this, but many games will do a "depth only" first render to fill in the z buffer, then they do the usual, more expensive pass, only where the pixel z matches the depth buffer z. This can really help with overdraw problems and reduce wasted fill rate.


0

It appears that this may not be possible, as noted in this blog post about the Outerra engine. I successfully moved the log depth buffer calculations into the vertex shader. This solved my problem with the Early-Z testing, but it also led to deal-breaking artifacts with triangles that were too close to / crossed the camera. Apparently the only way to fix ...



Top 50 recent answers are included