Filtering flickering on screen

All topics about ZGameEditor goes here.

Moderator: Moderators

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

Filtering flickering on screen

Post by Ats » Fri Jul 31, 2020 10:58 am

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?

User avatar
Kjell
Posts: 1731
Joined: Sat Feb 23, 2008 11:15 pm

Re: Filtering flickering on screen

Post by Kjell » Fri Jul 31, 2020 11:12 am

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

User avatar
Ats
Posts: 277
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Filtering flickering on screen

Post by Ats » Mon Aug 03, 2020 11:15 am

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