2010-09-03, 12:28 AM
For some reason I was thinking about dithering, and I remembered that Som seems to want to have dithering. I double checked this, and it's true.
Now I don't think dithering was ever supported by ddraw/d3d in 32bpp modes. But in the 16bpp mode presumably there is supposed to be dithering. You may also notice in the various Objedit like tools there is dithering going on. The thing is apparently graphics hardware manufacturers at some point stopped supporting (hardware) dithering. Apparently this was bad for a lot of older 16bpp games because without dithering the rainbow banding effect is more plain to see and these games were never intended to be displayed without dithering, so that's a shame. The reason there is dithering in Objedit and friends is presumably because they are in software rendering mode.
I've added a variable that overrides Som's dither setting to turn off dithering for starters. The reason why is just because I figure games should be consistent across hardware and dithering really changes the look of the game and by default authors probably want their games to be consistent (even though there probably isn't many contemporary chips that implement dithering if any)
That said apparently dithering is how Som was meant to be seen... in 16bpp mode at least anyway. I know KF2 (Melanat) has dithering. In fact you all playing KF2 on emulators are not getting the full experience very likely because there probably is no dithering happening. I checked epsxe and my plugin was not dithering KF2 anyway.
Probably I was thinking about KF2's visuals when my mind found it's way to dithering this morning... speaking of which I completely forgot about my coffee...
I figure if one of you lot ever get an urge to make a game with the KF2 graphics it might look a lot better with a dithering effect for that matter. So I reckon I will try to implement some form of dithering in the D3D9 shaders... probably right before the gamma correction stuff.
The dithering I see in Objedit is not the same I think as what I plan to do (https://en.wikipedia.org/wiki/Ordered_dithering) but I think the kind of dithering I will try to achieve will be better in some ways because the DirectX dithering can cause problems when there are transparent pixels, because they get dithered with the non transparent ones and end up creating a kind of unnatural fog where every other pixel is transparent. It may in fact be Objedit is just dithering the textures, because otherwise I think there would be that kind of fog around every open edge of a polygon.
This (https://en.wikipedia.org/wiki/Ordered_dithering) kind of dithering just dithers the colour of each pixel depending on where it falls on the screen, which I'm pretty is how PSOne dithering works. In fact the PSOne dithering can be somewhat annoying on a non-standard-def-tube-display because the dithering mask is fixed even while moving so it seems like you're wearing a kind of veil. I think if I get that far probably the pattern can be swapped out whenever the view changes (kind of like how the stars change in KF2) to alleviate that.
EDITED: The dithering in Objedit seems to be something about how colorkey is implemented. It only happens within textures anyway. I don't know if it's better or worse than just knocking out the whole unfiltered (square) texel. I wonder what makes it work that way though.
Now I don't think dithering was ever supported by ddraw/d3d in 32bpp modes. But in the 16bpp mode presumably there is supposed to be dithering. You may also notice in the various Objedit like tools there is dithering going on. The thing is apparently graphics hardware manufacturers at some point stopped supporting (hardware) dithering. Apparently this was bad for a lot of older 16bpp games because without dithering the rainbow banding effect is more plain to see and these games were never intended to be displayed without dithering, so that's a shame. The reason there is dithering in Objedit and friends is presumably because they are in software rendering mode.
I've added a variable that overrides Som's dither setting to turn off dithering for starters. The reason why is just because I figure games should be consistent across hardware and dithering really changes the look of the game and by default authors probably want their games to be consistent (even though there probably isn't many contemporary chips that implement dithering if any)
That said apparently dithering is how Som was meant to be seen... in 16bpp mode at least anyway. I know KF2 (Melanat) has dithering. In fact you all playing KF2 on emulators are not getting the full experience very likely because there probably is no dithering happening. I checked epsxe and my plugin was not dithering KF2 anyway.
Probably I was thinking about KF2's visuals when my mind found it's way to dithering this morning... speaking of which I completely forgot about my coffee...
I figure if one of you lot ever get an urge to make a game with the KF2 graphics it might look a lot better with a dithering effect for that matter. So I reckon I will try to implement some form of dithering in the D3D9 shaders... probably right before the gamma correction stuff.
The dithering I see in Objedit is not the same I think as what I plan to do (https://en.wikipedia.org/wiki/Ordered_dithering) but I think the kind of dithering I will try to achieve will be better in some ways because the DirectX dithering can cause problems when there are transparent pixels, because they get dithered with the non transparent ones and end up creating a kind of unnatural fog where every other pixel is transparent. It may in fact be Objedit is just dithering the textures, because otherwise I think there would be that kind of fog around every open edge of a polygon.
This (https://en.wikipedia.org/wiki/Ordered_dithering) kind of dithering just dithers the colour of each pixel depending on where it falls on the screen, which I'm pretty is how PSOne dithering works. In fact the PSOne dithering can be somewhat annoying on a non-standard-def-tube-display because the dithering mask is fixed even while moving so it seems like you're wearing a kind of veil. I think if I get that far probably the pattern can be swapped out whenever the view changes (kind of like how the stars change in KF2) to alleviate that.
EDITED: The dithering in Objedit seems to be something about how colorkey is implemented. It only happens within textures anyway. I don't know if it's better or worse than just knocking out the whole unfiltered (square) texel. I wonder what makes it work that way though.