- Home /
Question by
Abotics99 · Apr 28, 2018 at 05:07 AM ·
shadersnormalssurface shadernormal mapvector math
Surface Shader apply normal map to object normal without pluggin it into o.Normal
Hey there, I've been searching everywhere for an answer but couldn't find anything! I was wondering how I might go about applying a normal map to I think it's called tangent space, without just setting o.Normal to my normal map vectors. since I want to use the more detailed normal vectors for things other than lighting data I don't want to set the normal which is gonna end up getting shaded.
void surf (Input IN, inout SurfaceOutputStandard o) {
o.Normal = UnpackNormal(tex2D(_Nrm, IN.uv_Nrm));
}
if i were to use o.Normal as a variable now it is "converted" how i want but it will get used with shading which i dont want, i just want the converted vector data.
Comment
Best Answer
Answer by Abotics99 · Apr 28, 2018 at 06:21 AM
OK.. I found the answer i needed here: https://forum.unity.com/threads/reading-vertex-normals-and-normal-map-within-a-surface-shader.151554/