PDA

View Full Version : How to enable w-buffering in OpenGL



yfn
11-20-2002, 09:14 PM
Z-buffering is a non-linear depths mapping,which produces artifacts,but W-buffering is a linear depth values mapping.How to enable w-buffering in OpenGL? It can be easily done in MS Direct3D.But In OpenGL, what can I do?

Humus
11-21-2002, 04:20 AM
You can't, OpenGL only support Z-buffering and there's no extension for supporting it either.

SergeVrt
11-22-2002, 12:17 AM
Originally posted by yfn:
Z-buffering is a non-linear depths mapping,which produces artifacts,but W-buffering is a linear depth values mapping.How to enable w-buffering in OpenGL? It can be easily done in MS Direct3D.But In OpenGL, what can I do?

Take a look http://developer.nvidia.com/docs/IO/1331/ATT/ZBuffering2.pdf

there are some hints how to make Z buffer to be linear mapped...(though the text is based on DX not on GL)