Advertisement

Lensflares!!!

Started by January 20, 2004 12:31 PM
0 comments, last by Marty666 21 years, 1 month ago
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:
Original post by Marty666
I could use gluProject, but i don't have a (x,y,z) location, because my light is directional.

Directional lights have no position by definition. You can create a fake light position using something like:
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