Lensflares!!!
Hi all, I''m trying to create some lensflares. I want to find the place my light is at. I could use gluProject, but i don''t have a (x,y,z) location, because my light is directional.
How do I find out where my light is on screen?
thanx,
Marty
_____ /____ /|| | || MtY | ||_____|/Marty
quote:Directional lights have no position by definition. You can create a fake light position using something like:
Original post by Marty666
I could use gluProject, but i don't have a (x,y,z) location, because my light is directional.
fake_light_pos = player_pos - light_direction * some_huge_value;
Then use this fake position with gluProject or do screen projection yourself.
You should never let your fears become the boundaries of your dreams.
[edited by - _DarkWIng_ on January 20, 2004 1:52:23 PM]
You should never let your fears become the boundaries of your dreams.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement