View Full Version : Orthographic projected textures
05-01-2005, 09:23 PM
Does anybody know of a tutorial or source code that shows how to perform projected texturing using an orthographic project ?
I've tried to set it up myself using glOrtho and gluLookAt but I cannot seem to get the camera view set up correctly in relation to the actual light source. The scene always appears backwards or not in the right place at all.
05-02-2005, 03:36 AM
What do you mean?
1/ You're rendering your scene with an orthographic projection and you want to, inside that scene, project a texture from a light source onto the scene using a perspective projection?
2/ You're rendering your scene in some arbitary way, and, inside that scene, you want to project a texture from a light source onto the scene using an orthographic projection (which would just be straight texturing with the texture coordinates transformed by the light matrix wouldn't it?)
05-02-2005, 04:01 AM
I'm rendering my scene with a perspective projection. But then I want to switch to an orthographic projection, render the scene again from the light's point of view, then save that to a texture.
The problem I'm having is getting gluLookAt to work correctly after calling glOrtho. I cannot seem to get it to work correctly and get the view to be cenetered at the light source and have the same view direction as the light.
05-02-2005, 05:06 AM
might be helpful showing us how you set up things currently
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.