PDA

View Full Version : ARB_fp & fragment-position



12-13-2003, 07:23 PM
Hi,

I'm trying to learn a bit more about fragment-programs, how would I go about getting fragment.position in worldspace coordinates?
I'm attempting to calculate the direction between the current fragment and a lightsource-position..

I suppose it would be better to do this per-vertex and interpolate the result across the polygon, but I just want to get something
simple up and running http://www.opengl.org/discussion_boards/ubb/smile.gif

Anyone care to help me out?

Thanks,
ML

Mazy
12-16-2003, 02:40 AM
You just send them via some texturecoord set.