Hello,
I have the need to reverse a light vector.
I have a scope on my weapon that when aimed, I want a streaking texture to appear when you look at the sun. I'm using a dot product between my normal map and a light vector and it works perfectly except that it's showing up only when I look directly away from the light. I need to flip it so that it happens when I look at the light instead.
I tried a thousand combinations of appends, masks, one-minus, subtracts and multiply by -1 in every channel and it all seems to affect the preview on a sphere but doesn't change it in the game. I even tried 3 copies of the light vector, each masked to R, then G, then B and then appended them all together and again, multiplying any of those channels by -1 definitely seems to change the preview on the sphere, but in game it just appears to be making the effect stronger or weaker, not actually changing what angle I have to look at for it to show up. When looking directly at the sun, it's black.
Light vector seems to be the only options since in 1p view, the scope is locked to the camera so reflection vectors and camera vectors never change when I'm mousing around.
Again, the desired effect is working flawlessly, just at 180 from the light. I need to flip the yaw and pitch on that vector.
Any clues? This is a little advanced for me.
Here's a video of the issue.
I have the need to reverse a light vector.
I have a scope on my weapon that when aimed, I want a streaking texture to appear when you look at the sun. I'm using a dot product between my normal map and a light vector and it works perfectly except that it's showing up only when I look directly away from the light. I need to flip it so that it happens when I look at the light instead.
I tried a thousand combinations of appends, masks, one-minus, subtracts and multiply by -1 in every channel and it all seems to affect the preview on a sphere but doesn't change it in the game. I even tried 3 copies of the light vector, each masked to R, then G, then B and then appended them all together and again, multiplying any of those channels by -1 definitely seems to change the preview on the sphere, but in game it just appears to be making the effect stronger or weaker, not actually changing what angle I have to look at for it to show up. When looking directly at the sun, it's black.
Light vector seems to be the only options since in 1p view, the scope is locked to the camera so reflection vectors and camera vectors never change when I'm mousing around.
Again, the desired effect is working flawlessly, just at 180 from the light. I need to flip the yaw and pitch on that vector.
Any clues? This is a little advanced for me.
Here's a video of the issue.
Comment