I've beening trying to do shadow mapping with glsl for a week, But I can't get the correct scene. I guess if it's because I didn't render the depth to texture correctly. and to clamp the coordinates of pixel into [0, 1] for texture look-up, do Ineed to multiply biasMatrix first then divide w or should I divide w then multiply biasMatrix? and can someone provide sample codes that be be built and run? Tnanks.