PDA

View Full Version : Pre-Z problem in WebGL.



oak3d
08-15-2011, 01:23 AM
Is there any one tried pre-z in WebGL?
In my solution, mesh is rendered with color write disabled and so only depthbuffer is updated in the first pass.
Next, in the second pass, the mesh is rendered again with normal rendering.
However, I got severe z-fighting effect in WebGL by performing pre-Z.

oak3d
08-15-2011, 09:19 AM
Problem has been solved. It's seems to be my fault. :D

yuri
08-16-2011, 07:57 AM
Just wondered, does the optimization make sense?

Yuri

oak3d
08-18-2011, 09:15 AM
If preZ only, it's not worthy I think, maybe slower.
But for some technique, such as many screen based post processing algorithms, depth view must be rendered first, so preZ can be performed with it.