Custom SRP: Complex Maps
It's time to add support for some more complex materials to our RP's shader!
Comments (2)
... float detailScale = INPUT_PROP(_DetailNormalScale) * c.detailMask; float3 detailNormal = DecodeNormal(detailNormalMap, 1.0 ); float3 detailedNormal = BlendNormalRNM( normal, detailNormal ); normal = lerp( normal, detailedNormal, detailScale ); ... I found that it should be like this code above, to calculate NormalTS correctly with Unity2020.3.7.
The problem is that Unity changed how the Core library function UnpackNormalmapRGorAG applies the normal scale. It used to return a normalized vector but version 10.4 returns a scaled vector instead. This doesn't just affect detail normals but also the scaling of the regular normal map. It's one of the things I deal with while upgrading Custom SRP to Unity 2020.
