View Full Version : help for shadow map on complete object

04-24-2003, 05:47 AM
I can take model's shadow map and map to plane object,but I dont know how I can use
them map to complete object?may I calculate
uv for object or ....please help me

04-24-2003, 07:31 AM
I can't map to "complex" object(not plane)
please tell me how to do it

04-24-2003, 07:43 PM
You can use texgen to do this.
It involves the texture matrix as well.
I think it went something like

translate(0.5, 0.5, 0.0);
scale(0.5, 0.5, 1.0);
frustum(same as for spot light);
transform(to light position);

and enable EYE_LINEAR for coordinates S and T.

There is a demo in the GLUT, advanced section called projtex.c and you can find documents that explain this better than me.

This works fine for "texture lighting", but not for doing shadows.

04-24-2003, 08:13 PM
Don't you need R and Q as well?

04-25-2003, 01:19 AM
You need Q too, but not R.