Now i wanted to port my code into the spring-engine, to use the melt shader on a lava-level. Which results in the fNormal not beeing calculated as in the threejs implementation.
I tryied several other variants and variations- and to be honest, i forgot quite a bit on what i was doing back then with the shadder.
So if anyone could give me a pointer to where three js normal calculations deviates from glsl normals, i woudl be glad.
As far as shaders are concerned these are just simple uniforms that take data in. The way the normal matrix is calculated is probably exactly the same in every engine. There are many many different ways to compute and average normals. For this it might be best to read/port threes vertex normal generation code.