|
1 registered members (AndrewAMD),
1,403
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Where's my error here?
[Re: Rhuarc]
#53944
09/02/05 17:38
09/02/05 17:38
|
Joined: Oct 2002
Posts: 8,939 planet.earth
ello
Senior Expert
|
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
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??
www.earthcontrol.dequoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
|
|
|
Re: Where's my error here?
[Re: Rhuarc]
#53945
09/02/05 19:28
09/02/05 19:28
|
Joined: Aug 2005
Posts: 107
NMS
OP
Member
|
OP
Member
Joined: Aug 2005
Posts: 107
|
Quote:
Actually... it's -vecSunDir.zyx if I remember right- for some reason the light vector is flipped funny in A6.... -Rhuarc
its a float4 it has to have more than xyz...
so i putt like this? vecSunDir = (x,y,z) or external float4 vecsundir.xyz???
|
|
|
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
|
|
|
|
|
|