uinosoft / t3d.js

ThingJS 3D Engine (t3d) is a lightweight, web-first, and extendable 3D rendering library.
BSD 3-Clause "New" or "Revised" License
179 stars 23 forks source link

Aliasing on normalmaps? #2

Open VanderSP opened 1 year ago

VanderSP commented 1 year ago

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 commented 1 year ago

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

shawn0326 commented 1 year ago

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

VanderSP commented 1 year ago

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!

shawn0326 commented 1 year ago

Let's reopen this issue until this this is resolved