strange behavior of the fog in FFP & with shaders

Started by
0 comments, last by Namethatnobodyelsetook 18 years, 8 months ago
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 ::.
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.

This topic is closed to new replies.

Advertisement