Jump to content
  • Advertisement
Sign in to follow this  
paic

strange behavior of the fog in FFP & with shaders

This topic is 4853 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, I just noticed something strange. I'm using shader model 2.0 for my heightmap. Recently, I added fog in the FFP, and I thought I would have to add the fog myself in the code of my shader. But surprisingly, when I tested it, it worked for the heightmap as well as for the other meshes that were going throught the FFP :/ So I thought "ok, i'm lucky, no need to code... strange though, I remember I had a problem with another shader ... maybe they improved their driver since the 9.0a ..." And today, I changed the shader models from 2.0 to 3.0 to test the performance, and at my big surprise, the fog didn't work anymore ! So, a long story to say : FFP fog works by itself with SM2.0 but not with 3.0 :/ That's weird, and I really don't understand, so if anyone has an explenation ... ^^ thx in advance .:: Paic Citron ::.

Share this post


Link to post
Share on other sites
Advertisement
I think I read that fog support was dropped from SM3, as you have more than enough power to handle fog yourself, and it will save you from bugs where each vendor handles fog differently. (See DirectX index entry "Fog, Depth, and Shading Mode Changes", paragraph 2.)

In SM 1.1 you needed to write to oFog.x (or float fogAmount:FOG) where 0 means full fog, and 1 means no fog.

I've yet to try fog mixed with SM 2.0, but I would have expected it to require you to write to a fog register.

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!