Hello,
Just wondering if the unity standard shader supports object space normal maps by default? Sorry have not been able to test this myself. Also, could not find anything about it in the Normal map section of the unity manual.
Cheers,
Hello,
Just wondering if the unity standard shader supports object space normal maps by default? Sorry have not been able to test this myself. Also, could not find anything about it in the Normal map section of the unity manual.
Cheers,
Normal maps are always expected to be in tangent space for the standard shader.
That’s what I was expecting, would you by any chance have any idea how hard it would be to change that, I am not really into shader coding, but I think I ready somewhere that you have to calculate the object in world space instead of tangent space in the shader to make object space normal maps to work. I am not asking for any code here, just if this would be a difficult change to the shader?
Cheers,
Object space normals in of themselves are pretty darn easy to use … Modifying the standard shader is less so. More specifically I wouldn’t even attempt trying to modify the standard shader directly, but instead write a surface shader and then modify the full generated shader.
If your comment is “I’m not really in to shader coding” then I would rate this as close to impossible, as is just about any question starting with “how easy is it to modify the standard shader”.
The reality is to use object space normal maps in a shader is as simple as:
half3 worldNormal = normalize(mul(tex2D(_ObjectNormalMap, uv).xyz * 2.0 - 1.0, (float3x3)_World2Object));