World space view direction in Cg geometry shader
-
01-07-2021 - |
Question
How to to get view direction in world space inside the Cg geometry shader?
La solution
it will be in the view matrix. Depending on your column-major or column-minor ordering, it will be in viewXf[3].xyz or flaot3(viewXf[0].w,viewXf[1].w,viewXf[2].w). Negate as desired to match your other math.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow