Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Billboard problems

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

Hello... I have a little question on billboards. Is there any way of preventing billboards from overlapping polygons??? Let me explain. Imaging you have a billboard for a light flare. This billboard is attached to a light object, and the light object is attached to a wall. When you get away from the wall, billboard''s size increase, and from a distance and over, the billboard seams to get inside the wall (when you are looking at it from and angle, not staight ahead!!). I can''t find a way of testing this, and doing something about it, except from not increasing billboard''s size. But this is not a option, because light flares must behave like this!!! Thanks in advance, and forgive my terrible English. HellRaiZer

Share this post

Link to post
Share on other sites
Depending on which artifact you''re trying to prevent:

1) Render all the walls first so that they write to the depth buffer, then render the billboards with depth testing enabled so that the light is cut off if it goes behind a wall.

2) Render the walls into the stencil buffer and then only render the light billboard onto pixels which are set in the stencil buffer. i.e. the light will then clip so that it only appears on the wall.

Simon O''Connor
ex -Creative Asylum
Programmer &
Microsoft MVP

Share this post

Link to post
Share on other sites
You can try to draw the wall first and then to draw the flare with depth testing disabled.

"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"

Share this post

Link to post
Share on other sites

  • 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!