Group: microsoft.public.win32.programmer.directx.graphics · Group Profile
Author: Jan BrunsJan Bruns Date: Jan 29, 2007 03:14
[jongware]:
> The DX9 documentation, however, is neurotically fixated upon
> vertex/pixel shaders, where all I want to do is
> load a greyscale as bump map and apply that on my current (textured)
> faces, with the same uv as the textures.
One way to set bump-mapping is:
1. compute the light-vector in a vs (i know you don't want to)
and put the result to diffuse color
2. set texture colorop to DP3, so that it results in the
dot product of diffuse and texlookup
Maybe setting D3DTSS_BUMPENVMAT is a way to somehow not use
a vertex shader to compute the light-vector, but maybe
you still need to set the blending-stages like above.
also, if the target-system doesn't support vertex shaders, one
probably already wants to do the transform in CPU, soit's no
problem to put the light-verctor to diffuse.
Gruss
Jan Bruns
|