Jump to content
  • Advertisement
Sign in to follow this  
zny2004

OpenGL how to make a bloom light

This topic is 4223 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

i read a paper, but... i have little idea to make it, can anyone give me a demo? other question: now i use the opengl's light function for my terrain lighting i want my terrain looks better, which lighting should i choice? thanks!

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by zny2004
i read a paper,
but... i have little idea to make it,
can anyone give me a demo?



nehe.gamedev.net has something like that. Not sure it's exactly what you want but try:

http://nehe.gamedev.net/lesson.asp?index=08

Quote:
Original post by zny2004
now i use the opengl's light function for my terrain lighting
i want my terrain looks better,
which lighting should i choice?
thanks!


Do you mean you want shadows and shading ? or a better terrain texture ?
1) Shadows are quite easy - assume the sun is shining down the +ve x axis. Go through each vertex in the terrain starting from x=0. (or pixel if you want more precision). Now go further in the +ve x direction. If the line from this current vertex (currentx,y,z) to the sun goes below the terrain height at any vertex (where it's x value < current x value) then the current vertex (or pixel) is in a shadow. So in the terrain bitmap, multiply the color of the pixels at this point by say 0.3 - ie this makes it darker and like in a shadow.

2) better terrain texture - look at texture blatting/blitting
Again
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=29

Or if you can't follow those try the book
"Focus on 3d Terrain programming"

cheers

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!