Filtering flickering on screen

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
Ats
Posts: 603
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Filtering flickering on screen

Post 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?
Last edited by Ats on Sat May 01, 2021 9:34 am, edited 1 time in total.
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Filtering flickering on screen

Post by Kjell »

Hi Ats,
Ats wrote: Fri Jul 31, 2020 10:58 amI 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
User avatar
Ats
Posts: 603
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Filtering flickering on screen

Post 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.
Post Reply