Advertisement

how to remove these artifacts?banding, jaggy. Thanks!

Started by July 23, 2024 01:11 PM
7 comments, last by gpu 1 month, 2 weeks ago

how to remove these artifacts?banding, jaggy. it's mainly use FS and no VS. the background is a texture. Thanks!


gpu said:
it's mainly use FS

I guess your FS causes the banding, but not knowing what it does i can only speculate.
Do you do use some loop, which has a different number of iterations across pixels? If so, it's a quantization artifact form this integer number. You could fix it with doing one iteration more, but interpolating this final result with the former by a value smoothing out the discontinuity.
Or you make sure the number of iterations is the same everywhere.

I guess it's not a filtering or precision issue, but can't tell for sure.

Advertisement

did refract and Reflect in fs using flow noise

On pc web browser.its OK.so it might be precision problem…

Is it able to do some aa or filter to avoid this.and its only appear at some place while some specific reflect and refract

Will it help to capture frame to analysis. What shuold be check firstly

Thanks

Probably the banding is already in the noise then, and a lack of precision could be the cause, e.g. if you precompute and store it in a low precision format.

But, do you do this refract / reflect just once, or in iterations, following some gradient?

In any case, one way to remove banding is to introduce noise, e.g. by adding a random perturbation to your input given to the noise function.
This may turn the banding into noise, which is mostly better, but not smooth.

gpu said:
Is it able to do some aa or filter to avoid this.

You could do a heavy blur ofc., but the solution seems to figure out why it works on web but not on mobile.

It could be the lower fp16 precision of the mobile GPU, but just as likely it's some silly thing like a bad format for framebuffers or textures.

Noise was made realtime by simplex flow. Made three noise which is float by three neighbor pixel, then sub and normalize them into rgba as fbo which sampled at next pass.already test highp float. And output the rgba at the second pass there is no visible banding.i will check the iterations.thanks. And if you capture it in renderdoc. What are the most important points to start find the reason. Thanks

Advertisement

gpu said:
into rgba as fbo

Make sure the frame buffer object has high precision, not something like 8 bits per channel which may be the default.

After that i would try to calculate the noise on demand and per pixel in the final FS, instead fetching it.
That's some work, but you would see if it helps with the banding or not.

JoeJ said:
After that i would try to calculate the noise on demand and per pixel in the final FS, instead fetching it.

Thanks so much! as the noise generation cost much, so need to gen it in a low resolution fbo. and also sample the noise textuer 3 times to make a normalized vector to pass to next pass. whatever, i will take a test. Thanks!

This topic is closed to new replies.

Advertisement