How do I use these together? As I understand it the way shadow maps work is by projecting the texture over the scene normally, but instead of using the colour value they compute it using Cv = textureCoord.r >= Cf ? 1 : 0.
While my texture coordinates for s and t are valid it seems r is always 1 in my fragment program.. Actually r doesn't seem to be 1, it is far greater than 1. It seems I need to normalize it.
How do I normalize my r coordinate if this is the case?



