When we use an a displacement for vertex shader positions is changing but normals isn’t. For some cases i can get normal data like i did that here:
But i don’ t know how i can smooth this normals. I think this is an important question because i faced with this too many cases and it can be an bottleneck for large spectre of shaders.
I think recalculate normals is not a big problem (for flat surfaces). But smoothing is the question for wich i’m not find an answer. The result that i got in preview of this material demo is sooo close to result that i have to achieve but sharpy faces just destroy my minds about material that i want
Maybe this tutorial How to Calculate Shader Graph Normals - Game Dev Bill may help. The article uses shader graph, but you should be able to recreate in NME and/or recreate in NME through translating the code. This isn’t something I do a lot of so I don’t have any tried and true methods.
I try to use your way in NME but…I just don’ t know what i do wrong…I hadput nodes to frames with accordance to your script for better navigation. Would you may to check this please?
Your computations of displacedNeighbour1/2 is wrong in the NME, you should apply the displace transformation to neighbour1/2, not do neighbour1/2 + displacedPosition.
This seems to do it:
Note that I had to use an elbow node to connect the output of the (final) normal vector merger block to the transform block (to compute the world normal), directly connecting both would not work for some reasons…