Quote:

Quote:

Actually... it's -vecSunDir.zyx if I remember right- for some reason the light vector is flipped funny in A6....
-Rhuarc




omg (ZYX)! thats why i always get so strange results and dont had any idea about Why!! man, how did you find that out??




I was being driven INSANE by it, and I just knew it was A6 being idiotic. So I figured it was an axis conversion and swapped Y and Z (A6 flips these axis from dX9). No luck, reversed the whole thing.. and BINGO! ^_^.

Quote:


its a float4
it has to have more than xyz...
so i putt like this? vecSunDir = (x,y,z) or external float4 vecsundir.xyz???



That doesn't matter. You could change float4 to float3 and it would be just fine. When you use vecSunDir.zyx, it automatically converts it to float3.

vecSunDir.zyx
is exactly the same as
float3(vecSunDir.z,vecSunDir.y,vecSunDir.x)

It's called swizzling- look it up on MSDN.

-Rhuarc


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog