I have an object space normal map that I would like to use on a mesh. I read this thread and modified the builtin Bumped Diffuse shader so that the normal is read directly from the texture ( o.Normal = tex2D(_BumpMap, IN.uv_BumpMap) ). Interestingly, this works in the color channel but not for the normals. What am I doing wrong? Picture below, on the left is the object normal map in the color channel and on the right it’s in the normal channel.
Some of the issues include the zig zag in the circle, the way the small top box is darker on some sides than the main box, and the way that I’m not getting a smoothly transitioning rounded edge on the bottom picture. It’s worth noting that all of the problems are along UV seams. I have disabled mipmapping. I can post my UV map if it helps.
The surface shaders still expect a tangent space normal map (it’s lighting and view directions are automatically rotated accordingly via that matrix).
So you’ll have to rotate them back to object then convert them to work with world space.
Sorry for crossposting! Bad forum etiquitte on my part
Farfarer, thank you for the reply… could you explain to me a little more how I could accomplish that? I’ve written a few GLSL shaders in the past but I’m mainly on the art side of things so it’s a bit over my head.
I think to do it in a surface shader would actually end up more expensive than to do it with a tangent space map. Which sort of defeats the benefits of the object space normal map (aside from absolute normals).
You might as well write your own shader that handles it.