Jump to content
  • Advertisement
Sign in to follow this  
ZoBuzz

Fog Problems

This topic is 3164 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'm adding fog to my scene, not volumetric fog, just simple linear fog effect as the hardware supplies fixed render pipeline fog effect. It seems that as I'm rendering my scene using shader ,in programming render pipeline , the hardware supplies fog cann't be used. So I have to pass depth from VS to PS, and calculate fog effect in PS. Object, terrain, water,normalmap..etc , all I have do this fog calculate... That sucks, Is there any one have good idea to solve this problem? Use multirendertarget to generate a depth texture,then render fog in a screen renderTarget,can this solve this problem?

Share this post


Link to post
Share on other sites
Advertisement
yes, if you use d3d10, u can just "eat depth" without outputing everything
in d3d9 or if you using antializisng you have to output depth in pixel shader
then in some post processing shader you can apply fog[that fog will be applied to depth=to all rendered objects]
"then render fog in a screen renderTarget,can this solve this problem?" -> YES

Share this post


Link to post
Share on other sites
Quote:
Original post by e3d_ALiVE
yes, if you use d3d10, u can just "eat depth" without outputing everything
in d3d9 or if you using antializisng you have to output depth in pixel shader
then in some post processing shader you can apply fog[that fog will be applied to depth=to all rendered objects]
"then render fog in a screen renderTarget,can this solve this problem?" -> YES


e3d_ALiVE,thank u ~~. "that fog will be applied to depth=to all rendered objects" I notice this too, is there any good way to solve this problem ?

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.

GameDev.net 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!