t3d.js icon indicating copy to clipboard operation
t3d.js copied to clipboard

Aliasing on normalmaps?

Open VanderSP opened this issue 2 years ago • 4 comments

Hi, maybe it´s not really an "issue", but you know some trick to reduce what they call "specular aliasing"? only some kind of aa processing, or you know some trick on the hat?

VanderSP avatar Jan 23 '23 01:01 VanderSP

I´ve found a very interesting article... lmk watt u think about it

https://blog.selfshadow.com/2011/07/22/specular-showdown/

it also shows this example https://www.selfshadow.com/sandbox/gloss.html CheapLean (toksvig aa)

also found this snippet of shader

https://gamedev.stackexchange.com/questions/84186/fighting-aliasing-on-specular-highlights

Maybe this is the most interesting resource i´ve found, babylon js does a kind of much usable apparently specular aa... im shocked that threejs don´t do this... looks like a common artifact in pbr world... i dunno if threejs just goes to TAA (i not tested TAA, but probably isn´t cheaper as what babylon does)

looks babylon does something like enableSpecularAntialiasing on pbrBaseMaterial, that enables SPECULARAA definitions across some shaders

https://github.com/BabylonJS/Babylon.js/search?q=specularaa

VanderSP avatar Jan 23 '23 13:01 VanderSP

Adding specular anti-aliasing sounds great, thanks for the suggestion and reference searches, we'll do some testing about this.

shawn0326 avatar Jan 24 '23 02:01 shawn0326

Cool!, why maybe three didn´t steal from babylon? if the three famous (playcanvas), has same age and copy themselves? maybe is slow? looks like few lines in some shaders

normal map aliasing is very UGLY! and looks very common in PBR world...

Thanks!

VanderSP avatar Jan 24 '23 03:01 VanderSP

Let's reopen this issue until this this is resolved

shawn0326 avatar Jan 24 '23 04:01 shawn0326