Well, NormalFromHeightmap function relies on sampling the heightmap with offset to determine slope, that is why it takes texture object as parameter. You cannot sample a float value or vector. So in your search for NormalFroMHeightmap function that accepts float, I’ll disappoint you. There is none.
What is your intended use with this setup? In overriding majority of cases there is either a better approach or workarounds.
As for, NormalFromFunction, it can generate normals from mathematical function, but its application is somewhat limited. It works by calculating a slope between offset versions of the same function, and should be used as follows, if i’m not mistaken:
- Function(UV1) input is your original function.
- Function(UV1) input is the same function, but it has to be offset by Height Map UV Offset value in R.
- Function(UV3) input is the same function, but it has to be offset by Height Map UV Offset value in G.
http://image.prntscr.com/image/7d2e15e8716b4471a8f797a947c5b1db.png