View Full Version : Fixing backprojection

10-28-2011, 03:55 AM
Well this'll be an old timer question, I'm doing this on fixed function because the base I'm working on is quite old, and I don't want to recode almost all of it.

I'm trying to add shadow mapping to my projective light, it works fine on the depth map side, but I get the well expected back projection problem, and I'm having trouble solving that. I know that my blending and all other texture units are set up fine, I'm just having trouble with the 1x2 pixel 1D clipper texture, that's explained here:

My problem is, I have no clue how I should set projection up for the clipper texture. I'm not very good when it comes to any kind of projection or matrix work. I was wondering if anybody could help me on this matter. I'm totally lost here. From what I understand I need the Z coord to be mapped to the S texture coordinate, but any of my attempts didn't work. Does anyone have an example of this working, at all?


Dark Photon
10-29-2011, 05:20 PM
You might check out this thread. Particularly the last few posts:

* GLSL - cube shadows - projecting (opengl.org thread, 3/31/11) (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=294592)

10-29-2011, 05:46 PM
This problem was actually "fixed", it wasn't the problem I had haha. Thanks for replying though, the problem was something else that I had gotten through.

The real problems are being discussed in the "Shadow mapping problem" thread.