Advertisement Jump to content
Sign in to follow this  

Lens flare...

This topic is 4987 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi everybody... I'm searching for a good lens flare effect, I'm going to implement it in my game using Direct3D of course, I've found some topics with some source codes, but none were totally descriptive, can any one help me? I want to have it like in GTA..., I have a huge terrain. any source codes, comments, or articles... thanks

Share this post

Link to post
Share on other sites
I wrote a lens-flare sample with D3D7 and VB6 if you're interested [smile]

If you can get your hands on the Game Programming Gems books, there was a chapter in there on making lens flares.

The most difficult thing I found with lens flares was to make sure they occluded properly - the actual rendering is relatively trivial. Occlusion needs to be solved by some sort of ray-triangle intersection test, which can be a bit tricky to implement efficiently only for this algorithm (easy if you already have the code lying around!)..

You might want to have a read of:
Lens Flare Tutorial
The Art of Modeling Lens Flares
Both of which reside on this fine website [smile]


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!