PDA

View Full Version : solid textures and depth buffer



Hoebie
01-30-2003, 01:36 PM
Hi there,
Reading the book "Computer Graphics using OpenGl", I learned that it was
possible to add solid textures to you ray-tracer (which is not implemented
by OpenGl, but they give their look on a possible implementation in the
book). Someone told me however that solid textures are NOT possible AT ALL
when working with the standard depth-buffer (Z-buffer). But why is this?
Why can't we add solid textures working with a depth-buffer?

rgpc
01-30-2003, 06:33 PM
What is a solid texture?

Coriolis
01-30-2003, 08:02 PM
I think he means 3d textures... and they do work with the depth buffer. You still have to draw surface geometry though.

jwatte
01-31-2003, 09:41 PM
You can apply a regular 3D texture using TexGen in object space quite simply. Set up your S, R and R axes in whatever way you want the 3D texture to be oriented.

You can write a procedural 3D texture using the ARB_fragment_program extension. This lets you do things like perlin noise based marble and wood, for example.

Both these work fine with Z buffering.

EDIT: If you want something that is volumetric; i e varies based on how much of a volume a ray of light falls through, there is no current hardware that can accelerate that, although there are some tricks you can play with pre-calculation.

[This message has been edited by jwatte (edited 01-31-2003).]