tellaman
03-11-2003, 01:44 PM
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
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