i was wondering if this is a good way to get frag position in eye space from a frag prog:
get fragment.position (window coords)
add w/2 to x and h/w to y (where w and h are viewport dims)
unproject with matrix.projection.inverse
it seems to work but i havent tested it extensively yet
please let me know your thoughts thanks
Originally posted by tellaman:
[b]i was wondering if this is a good way to get frag position in eye space from a frag prog:
get fragment.position (window coords)
add w/2 to x and h/w to y (where w and h are viewport dims)
unproject with matrix.projection.inverse
it seems to work but i havent tested it extensively yet
please let me know your thoughts thanks[/b]
Hi
well, I do it by calculating the eye space position in a vertex program and then I interpolate it in a texture coordinate.
Bye
ScottManDeath