I've been writing a nice shiny new lighitng system, but have run into a small snag... I can render the new lighting stuff (a texture to which I have drawn an appropriate lighting mask), but when I move my camera, the lights (which are effectively holes punched through an opaque cover) don't seem to move at the same rate as the underlying scene. I use the same camera placement code in the FBO (to make the texture) rendering context as I do in the underlying scene. The only real difference I can think of is that the local Z coords happen to be set up backwards between the two (but that shouldn't have any effect on horizontal camera movement, I think).
The relevant camera code is:
where ViewPoint = the sum of the Position and ViewDir 3d vectors, ViewDir = (0.0, 0.0, -1.0) (i've tried flipping the z coord for the camera setting in the z flipped FBO context with no apparant effect), and UpVector = (0.0, 1.0, 0.0).
I'm using an ortho projection for both the main scene and the FBO. I tried using gltranslated for the FBO local camera but that seemed to make the problem worse.
If there's any other info you need, let me know. Thanks!
Edited by medevilenemy, 23 June 2012 - 11:16 AM.
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.