VOGONS


Source DirectX9 grey fog bug

Topic actions

Reply 20 of 28, by ZellSF

User metadata
Rank Oldbie
Rank
Oldbie
MilkeyWilkey wrote on 2020-05-12, 14:43:

@ZellSF, check your native nvidia sin screenshots closely, there is fog, but it's further away, just like in HL2. Also, I think as you have what seems to be a correct look with sin you can also try out 1.0 HL2 and see how it looks for you

There's also the Sin trailer that showcase what seems to be correct look https://www.youtube.com/watch?v=BYzQ89RSyHg

For the screenshots I posted, no even if the fog is visible in the Nvidia screenshot it's way too absent for an intentional effect IMO.

However, the Sin trailer does seem to indicate that the thinner fog is what is intended. Weird how it only seems to work on Nvidia cards (then again it's a Nvidia "sponsored"game).

Reply 21 of 28, by MilkeyWilkey

User metadata
Rank Newbie
Rank
Newbie
ZellSF wrote on 2020-05-12, 15:36:

Weird how it only seems to work on Nvidia cards (then again it's a Nvidia "sponsored"game).

Funny, but it turned out to not be the case. I've found a notebook with AMD Radeon HD7500 (Windows 7) and it worked flawlessly. And at the same time, on the other notebook with Geforce 710M (Windows 10) it is buggy.
btw, all of my previous shots was taken from RX 590 Windows 10

Attachments

  • lab.2-HD7500c.jpg
    Filename
    lab.2-HD7500c.jpg
    File size
    191.87 KiB
    Views
    110 views
    File license
    Fair use/fair dealing exception
  • lab.2-HD7500.jpg
    Filename
    lab.2-HD7500.jpg
    File size
    207.92 KiB
    Views
    110 views
    File license
    Fair use/fair dealing exception
  • title.2-HD7500.jpg
    Filename
    title.2-HD7500.jpg
    File size
    265.33 KiB
    Views
    110 views
    File license
    Fair use/fair dealing exception

Reply 23 of 28, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Found this
https://www.nvidia.com/object/winnt_77.72.html

Geforce 6800: Half-Life 2 fog is different when using ATI hardware.
This is not an NVIDIA bug, but rather an issue with the application.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 25 of 28, by Dege

User metadata
Rank Oldbie
Rank
Oldbie

Yes, sorry, I kinda thought it's been solved by settings nVidia as video card type.

I tested your savegame with HL2 but I don't understand the result. When developing DX9 I remember I had to select GF5700 (or set card type to nVidia) to get HL2 to work (render) properly.
This time I just tried the game with vanilla dgVoodoo settings and DX9+ selected in the game and got this:

HALF-LIFE-2-2020-05-26-14-56-00.png

HALF-LIFE-2-2020-05-26-14-56-34.png

HALF-LIFE-2-2020-05-26-15-01-41.png

HALF-LIFE-2-2020-05-26-15-01-56.png

Isn'it how it should look? Or I don't have fog enabled at all? 😀
I couldn't yet (for the time being) try Sin because I don't have it.

Last edited by Dege on 2020-05-26, 13:17. Edited 1 time in total.

Reply 26 of 28, by Dege

User metadata
Rank Oldbie
Rank
Oldbie
DosFreak wrote on Yesterday, 20:41:

Found this
https://www.nvidia.com/object/winnt_77.72.html

Geforce 6800: Half-Life 2 fog is different when using ATI hardware.
This is not an NVIDIA bug, but rather an issue with the application.

Hmm... What could that issue be?
Fogging has 3 different types in DX with defined formulas to calc by, how can an application be an issue here if the driver works as expected?

My only tip is that there is a little difference between DX8/9 in the vertex/pixel pipeline for fogging and HL2 relies (relied?) on the DX8 one.

Reply 28 of 28, by Dege

User metadata
Rank Oldbie
Rank
Oldbie

It turns out that what we believed to be fog, that's not fog... It just looks like fog.

I checked out Sin with DX8 and DX9 level renderer (through dgVoodoo) and debugged the shaders for a problematic part. The calculated fog values were the same with both DX8/9 levels…
Also, in both cases the sampled texture is multiplied by an intensity factor (coming from the game) in the shader.

The difference between the two cases:
- DX9 level: the game renders parts of the scene with SRGB textures and SRGB rendertarget. SRGB scales the texture input/shader output from/to the linear space, so the intensity changes (it becomes too bright giving the impression of dense fog)
- DX8 level: SRGB is unsupported

For DX9 the SRGB part seems to be broken. Either it shouldn't be enabled or the intensity factor used in the shader should be slightly different. I had a look into what if SRGB is completely disabled but then it's too dark.

DX9 With SRGB:
Si-N-Episodes-2020-05-26-18-59-35.png

DX9 Without SRGB
Si-N-Episodes-2020-05-26-18-57-15.png

So, nVidia seems to be right, it's an issue with the application. 😖
What I don't understand however, how does this game looks perfectly for me natively (nVidia card)? They added a built-in patch in the driver?
Or, the engine selects the intensity value depending on hw vendor value and various driver cap bits?

(My HL2 version is probably a fixed version and that's why I don't get the issue with that.)