// TODO: precompute these scaling factors!
float tilingScale = rcp(0.5 * abs(_BaseColorMap_ST.x) + 0.5 * abs(_BaseColorMap_ST.y));
height *= tilingScale;
#if _MAPPING_PLANAR
height *= rcp(_TexWorldScale);
#endif
return height;
}
float3 displ = height * normalWS;
// Applying scaling of the object if requested
// Note: In case of planar mapping there is no object scale as we do world space planar mapping (not object space planar mapping)
#ifndef _MAPPING_PLANAR
return displ;