i searched through the forum and fond this topic discussed many times.
Sorry for bothering u again .
I implemnted a (noobish) 3-pass shadow mapping algorithm.
1st render depth map from lights view
2nd render scene shadowed
3rd render lit scene without shadowed areas (with alpha test)
In the 3d pass texgen is setup to project the shadow texture on the cams view. But now all textures (i call a display list for the scene) are projected that way and shadows arent renderd at all.
Do i have realy to brake up the whole 3D Model and push the texture attribs?
Is there maybe a way to get hands on each single texel an bake it into an statement like
i remember that i implemented shadow mapping following a tutorial that makes shadow mapping in two passes, try search paul’s tutorial, if you don’t find it ask me and i’ll send you via email.
thanks for your reply. I have found Paul’s shadow tutorial, but its done in 3 passes too and dosnt adress the usage problem of ‘regular’ texture mapping.
So if the test comparision returns zero, its draw a black pixel over the top of the ‘lighted’ scene, else, it draws nothing (keep the lighted scene).
You can use the ARB_shadow_ambient extension or write a pixel shader in order to not write zero on black area but just 0.2 in order to ‘dim’ the shadow.
On nVidia, the PCF will blurs also the results for free.
Eventually, the third pass can be renderered in a texture, then gaussian blurred in order to get soft shadows.
Thats the cleaner way to do the scene first and than the shadows and The ARB_shadow_ambient is a nice tipp.
To solve the texture projection problem i had to reset texGen and disable shadow comparsion when that part was done … grrr thats late night (or early morning?) fun, i just should take a brake after 8 hrs.