I found some strangeness working with the node materials.
The normal map / perturbNormal Block seems not to work as intended.
Some digging revealed the following problems:
Normal default color (127, 127, 255) does not align with empty normal.
This seems to be a general normal map problem that also occurs with PBR Material.
The color (127, 127, 255) is converted to (0.498, 0.498, 1.0) instead of (0.5, 0.5, 1.0) as well as in the color picker as with the sampled texture.
Seems to be somewhat related to the rounding problematic mentioned in Wrong albedo colors. But I am surprised that the texture sampler does the same.
The normal texture level somehow rotates the normal instead of smoothing/boosting it.
This works well in the PBR Material but not in the Node Material.
The strength of the perturbNormal block rotates the normal on very low values. Shaded color goes to black on 0.
I tried this as a replacement for the texture level but it doesn’t to the job either.
The perturbNormal Block can only be once in the material. Leads to redefinitions in the shader otherwise.
I tried this as a way to stack normals (like with detail textures) but I get errors when I have more than one perturbNormal block. Is there a better way to do this or can this be solved somehow?
Overall the color rounding problem seems to be a general one. But it is way less noticeable in PBR Material as the texture level works as intended.
I followed the playground examples and documentation and made a playground to test and verify: https://playground.babylonjs.com/#D6G4UD#7
Note that the generated material code already has the wrong color value in line 122 as it was made with the color picker.
Did I get something wrong in the node tree or is there another solution? Otherwise I would be glad if I could at least get the level/strength right.
Help is greatly appreciated.