Jump to content
  • Advertisement

Archived

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

Bouga

SkyBox? When?

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

When do you draw you skybox, before or after everything else to save on some pixel filling? If after, how do you get it to be behind everything?

Share this post


Link to post
Share on other sites
Advertisement
Well, I didnt want to do that becouse I also have terrain that, in most cases, stretches out to the far cap plane, and I dont want to cap off even more of it with the sky box, but if thats the only way - Ill just have to live with that.

Share this post


Link to post
Share on other sites
No don''t do that, the skybox only needs to be big enough to enclose the camera. Its usually in front of alot of other scenery. Its like smoke and mirrors really lol. If you render your quads at the extent of your clip planes they''re going to have to be huge. Rather render the skybox last and disable Z testing so you don''t occlude any pixels already written to the frame buffer thus generating the illusion that its behind everything else.

Share this post


Link to post
Share on other sites
Err sorry, you need to render it first without Z testing so that depth info isn''t written to the Z buffer then turn Z testing back on and render your terrain which will occlude parts of the skybox. That should do it

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.

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

Sign me up!