Hi All,
I’m having some trouble with a normal map generated procedurally. I am making the normal map through a couple of greyscale masks so I don’t have a texture object (hence I can’t use NormalFromHeightmap function), but I can use the NormalFromFunction which seems to do the trick for creating the right normal, but it doesn’t rotate - or more importantly it doesn’t update when the light rotates around it like a normal map should.
The rotation function below works great with normal maps that are texture samplers (I can rotate the material or the directional light and it updates its normals), but this doesn’t seem to work when the normal map is procedurally generated in this way.
Any experts out there that could offer me some advice? Much appreciated!