View Full Version : Request For Shadow Mapping Tutorials Using GLSL

James A.
11-03-2008, 06:13 AM

I've been stuck all day trying to get my working fixed functionality shadow mapping converted over to using GLSL shaders.

I'm not quite sure what is wrong, but I've found patchworks of tutorials online, and I'm pretty sure it's a problem with my GL states (though actually I'm somewhat tired and it could be a simple mistake elsewhere)

anyway getting to the point, are there any good tutorials for doing this online? I've found some that are part of larger projects - but it's harder to see where my mistake is there. I'm looking for something simple and complete (i.e. having both the GL side and the GLSL side) so I can strip my work down and find out where I am going wrong.

Thanks for any help,


11-03-2008, 10:40 AM
try this one (http://www.flashbang.se/index.php?id=35)

James A.
11-05-2008, 03:02 AM
Thank you very much zeoverlord.

I assume that is your site, so just to let you know the shaders threw up some runtime errors when I tried to build and run this.

In glsl.frag there are some floats defined as 0 rather than 0.0 (on lines 24,26,34,37,39) and changing them to the 0.0 makes the code run with no problems.

Thanks again, it should be a big help.

11-05-2008, 04:01 PM
yea, i know, if you read the comments that explains some of the fixes, it all stems back to when nvidia would allow that behavior, but now they don't.
I have been meaning to fix them all but i have been occupied with other stuff.