Page 1 of 3

[Feature request] Posterization effect

Posted: Wed Sep 25, 2019 9:37 am
by pango
To complete the retro rendering experience!

@DMadarasz on Twitter experimented with such effect using Redshift: https://twitter.com/DMadarasz/status/11 ... 2303082498

Re: [Feature request] Posterization effect

Posted: Wed Sep 25, 2019 10:50 am
by King of Worms
Right :) looks more like the old 256 color palete with sharp color gradients

Re: [Feature request] Posterization effect

Posted: Mon May 04, 2020 3:58 pm
by pango
Coming in 0.10.23 :)

Re: [Feature request] Posterization effect

Posted: Tue May 05, 2020 7:40 pm
by MasonFace
Niiiiiiiiice!

Re: [Feature request] Posterization effect

Posted: Wed May 06, 2020 11:06 pm
by pango
Here's a taste of the palettization effect:

(switch to 1080p for best result)

But you don't need to try to emulate classic as closely as I tried in this demo; It's fine in 640x400, mixed with mods compatible with retro mode too.

Re: [Feature request] Posterization effect

Posted: Thu May 07, 2020 5:24 pm
by MasonFace
Done got me hot and bothered watching those videos. The posterization/color quantization/palletization looks great! I can't wait to use this setting.

Re: [Feature request] Posterization effect

Posted: Thu May 07, 2020 8:35 pm
by pango
Maybe I should explain what the options in 0.10.23 will be, because DFU will get 2 retro shaders for the price of none, so it could be confusing...
  • First you'll still be able to run retro mode with no shader; just the reduced resolution as before. If you used that mode before because that's all what your video card could handle, that will still be available;
  • Second, you can enable a posterization shader. That will reduce the display to about 5000 uniformly spaced RGB colors. That's very cheap to compute as shaders go (it can run at 400 fps on my GTX960), and produce color banding that gives a nice retro look. You could probably get a similar result with some Reshade posterization effect, but now it will be embedded in DFU and available on all platforms.
  • Third, palettization shader. This will replace each pixel's color with the nearest color taken from Daggerfall palettes. Right now I took all the colors from ART_PAL.COL, and added the 32 first very dark blue colors from NIGHTSKY.COL, because otherwise the night sky would look grey. I used k-d tree nearest neighbour algorithm and used code generation to optimize it as much as I could, and it often runs at 200 fps on my rig, so it's not that bad but obviously more expensive than posterization
Lastly, if you use any of those 2 shaders, you can turn them on and off at any time using Shift-F11, That was mostly useful for debugging, but it's still there to satisfy your curiosity or any other need.
And by the way, retro mode restrictions still apply, it's not compatible with mods that use extra "cameras", currently that's Enhanced Sky and Distant Terrain mods.

Re: [Feature request] Posterization effect

Posted: Thu May 07, 2020 11:40 pm
by pango
With player item based light sources, low dungeon ambient light (say 0.1) and a touch of Postprocessing mod ambient occlusion, you can breath new life into classic textures... I really like all the copper tints you can get. I'm not sure browsers will give those pictures justice, but trying:
blocks.jpg
blocks.jpg (152.2 KiB) Viewed 4193 times
room.jpg
room.jpg (144.31 KiB) Viewed 4193 times

Re: [Feature request] Posterization effect

Posted: Thu May 07, 2020 11:48 pm
by Interkarma
This is lovely. I've scheduled for myself a leisurely playthrough sometime around beta. Not as a dev, but to try and just enjoy playing the game again like I used to. I really think this will be the format I go for when that happens.

Re: [Feature request] Posterization effect

Posted: Sat May 09, 2020 1:59 pm
by Hazelnut
Just dropping in to say nice job Pango! This really nails that classic feeling so well, and while I doubt I'd actually play with it - bloomin awesome the option is there if I feel like it.

Brilliant work mate.