|
1 registered members (TipmyPip),
18,484
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Where's my error here?
[Re: ello]
#53946
09/02/05 23:25
09/02/05 23:25
|
Joined: Mar 2001
Posts: 3,298 Beverly, Massachusetts
Rhuarc
Expert
|
Expert
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
|
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
|
|
|
|
|
|