Jump to content
  • Advertisement
Sign in to follow this  
qrn_1982

Billboard Sun!

This topic is 4082 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,everyone!How to draw a sun with billboard technique around skybox?I am confused with this.Could anybody help me?

Share this post


Link to post
Share on other sites
Advertisement
The way I did this is to:

-give the sun a coordinate (say, <0,0,100> or something)
-each frame transform that coordinate by the world, view, and projection matrices. The function D3DXVec3Project can do this easily.
-Check if the resulting 2-D location is within the screen coordinates
-If it is, place a regular textured quad with the sun image centered at that location.
-Use additive blending to cheaply improve the sun effect

You may want to consider using two (or more) textures to do the sun, a glow effect (that may need to rotate), and possibly lens flares. The toughest part for me was working in the image editor to get the colors and shapes that look good when blended into the scene. Or were you looking for more help with the math?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!