Depth correct bumpmapping and the texdepth instuction. . .

Ostsol

New member
Since I don't know Direct3D programming, I've been experimenting with the texdepth instruction via RenderMonkey in order to achieve depth correct bump mapping. Unfortunately, I've been having little success.

I've modified the dot3 bumpmapping effect to the following code to initially test the texdepth instruction:

Code:
ps.1.4

texld r3, t0 ; height map

mov r5.r, r3.r
mov r5.g, c0.r

phase

texld r0, t0 ; base map
texdepth r5

The height map I'm using happens to the be fieldstonebump.tga from an older ATI bump mapping demo that's in the Radeon SDK. It's a black and white image that appears to represent a height map correctly, white being the highest points and black being the lowest. The base texture is the fieldstone.tga that the RenderMonkey bump mapping demo normally uses.

Anyway, the result of this is that the image looks like two layers of the base texture, the second layer being a mirror of the first -- which is not what I wanted, of course. . . Any help?
 
Back
Top