Page 1 of 1

Filtering flickering on screen

Posted: Fri Jul 31, 2020 10:58 am
by Ats
if you want your cos(x) functions to stop aliasing (flickering) on the screen, you need to filter them. If w=pixel size, replace cos(x) by
(1/w)∫cos(t)dt, t ∈ (x-½w, x+½w) = cos(x)·sin(½w)/(½w)
https://iquilezles.org/www/articles/ban ... miting.htm

I just read that article and find the rendering very smooth. Is it possible to achieve something like this in ZGE using shaders?

Re: Filtering flickering on screen

Posted: Fri Jul 31, 2020 11:12 am
by Kjell
Hi Ats,
Ats wrote:
Fri Jul 31, 2020 10:58 am
I just read that article and find the rendering very smooth. Is it possible to achieve something like this in ZGE using shaders?
Sure, you can just ( pretty much ) copy-paste the fragment shader. Thing is though, that this is a technique useful with runtime procedural textures. So unless that's what you're doing there are better & faster alternatives available.

K

Re: Filtering flickering on screen

Posted: Mon Aug 03, 2020 11:15 am
by Ats
Oh. All right then. I'll try it for the flickering stars in the background of Omeganaut.
But maybe a simpler anti aliasing filter would be better to smooth everything.