Page 1 of 2

[0.13] Unstable Retro Rendering

Posted: Mon Sep 20, 2021 8:46 pm
by sayber1
While testing the new 0.13 version I've ran into a pretty wierd issue. When using any retro rendering mode, and either palletization or posterization mode, the image displays artifacts with dithering(?) which is also temporaly unstable.

Tested with no mods, both posterization methods, both retro rendering resolutions. Issue isn't present in native res. After additional testing it seems like the issue is present in retro rendering whithout posterization, it's just less noticeble.

I'm attaching screenshots with a same scene in pause menu where the issue is visible. Look at the lower sky near mountains.
Spoiler!
2021_09_20_23_33_54.jpg
2021_09_20_23_33_54.jpg (292.26 KiB) Viewed 1630 times
2021_09_20_23_33_53.jpg
2021_09_20_23_33_53.jpg (292.44 KiB) Viewed 1630 times
2021_09_20_23_33_52.jpg
2021_09_20_23_33_52.jpg (292.61 KiB) Viewed 1630 times

Re: [0.13] Unstable Retro Rendering

Posted: Mon Sep 20, 2021 9:22 pm
by Interkarma
Thanks for feedback, will move to issues and look into this soon.

Edit: updated reply below.

Re: [0.13] Unstable Retro Rendering

Posted: Mon Sep 20, 2021 10:25 pm
by King of Worms
I downloaded all screens because I did not see any difference between them, when listing thru them in fullscreen, the only difference is few pixels moved here and there, but I dont see the exact issue here? Maybe Im slow but it might be worth a while explaining the problem, or adding a note to the screens on what they are supposed to be showing.

Re: [0.13] Unstable Retro Rendering

Posted: Mon Sep 20, 2021 10:44 pm
by Interkarma
Taking a closer look now that I'm awake. The pixels in screenshot may actually be in classic data. Some of those drawings do use unusual colour stippling that only appear in certain frames.

The screenshots above may not indicate a problem with sky. Could you please provide a save at that exact point please? I always prefer a save to screenshots, or a save in combination with screenshots. Cheers!

Also agree with KoW - it looks like you've uploaded the same image 3 times to me.

Re: [0.13] Unstable Retro Rendering

Posted: Tue Sep 21, 2021 5:31 am
by pango
To me that's something to be expected when you look at an already dithered texture (the sky box) thru a moving low res grid (retro mode resolutions), like when you're slowly changing view direction (okay, that's the sky box moving relative to a fixed grid, but result is the same). If you're not explicitly changing view direction, I assume it could be some slight jiggle in your mouse position.
Retro mode shaders do not fundamentally change that (they don't do dithering, they're strictly per-pixel processing), maybe they just make the sky box dithering more visible in places because of palettes conversion (that's why they're "-sky" options to exclude them from shaders in the first place) sometimes increasing contrast between neighbor pixels.

It should also be exactly the same with previous DFU versions, and not a regression in 0.13.

Re: [0.13] Unstable Retro Rendering

Posted: Tue Sep 21, 2021 11:09 am
by sayber1
That's a thing, I didn't move camera. I specifically opened a pause menu, so it's a completely static scene without any player input. This issue isn't as obvious in screenshots, but the entire scene(shift through pictures and look closely at even the houses) is flickering at the refresh rate, almost like a broken lowres film grain effect.
EDIT:
A attach a cropped version of combined screenshots with gradually lowered opacity on each layer that shows shifting of dithering in those 3 different but same fully static frame. And a single frame in comparison
Spoiler!
LowOp.png
LowOp.png (78.08 KiB) Viewed 1548 times
LowOp2.png
LowOp2.png (71.47 KiB) Viewed 1548 times

Re: [0.13] Unstable Retro Rendering

Posted: Tue Sep 21, 2021 4:39 pm
by pango
There's an issue open on GitHub that could be related then (but not restricted to skybox): https://github.com/Interkarma/daggerfal ... ssues/2246

Re: [0.13] Unstable Retro Rendering

Posted: Tue Sep 21, 2021 4:55 pm
by sayber1
pango wrote: Tue Sep 21, 2021 4:39 pm There's an issue open on GitHub that could be related then (but not restricted to skybox): https://github.com/Interkarma/daggerfal ... ssues/2246
Yep, this is the issue I've been talking about, bad on me for missing this post. I've never said it was a bug with skybox, it was just the most obvious place to show it's effect.
I've also seen it, though it's much less noticeable, without palletiztion/posterization modes, so I wonder if it's present in native res, as it would be practically imposible to see.
EDIT:
To indicate. Cropped screenshot with no posteriation/palletization with boosted contrast in photoshop
NoPost.png
NoPost.png (43.24 KiB) Viewed 1515 times

Re: [0.13] Unstable Retro Rendering

Posted: Tue Sep 21, 2021 11:30 pm
by Interkarma
The issue here is a "magic dither" Unity has hardcoded at end of postprocessing stack, even when no effects enabled. It's always there, but most visible with limited colours like palettization/posterization. The only way to remove this is to hack it out of the uber shader.

I'm more likely to revert postprocessing back to the old embedded stack at this point.

Re: [0.13] Unstable Retro Rendering

Posted: Wed Sep 22, 2021 2:45 am
by Interkarma
This will be resolved in 0.13.1 release. I've embedded new PostProcessing v3.1.1 stack into project and disabled Unity's "magic dither" in hidden postprocessing shaders.