I have a 2d triangle with uv coordinates, i have a point d and I wish to calculate the uv coordinates for this point.
It has to fit in a geometry shader, can someone help me out?
Google for "barycentric coordinates", that should do the job.
Don't forget to do perspective correction.
It's a 2D triangle...