// HD use specific GraphicsSettings
GraphicsSettings.lightsUseLinearIntensity = true;
GraphicsSettings.lightsUseColorTemperature = true;
// HD should always use the new batcher
// HD should always use the new batcher - TODO once fix are backport in 2018.2/staging
//GraphicsSettings.useScriptableRenderPipelineBatching = true;
SupportedRenderingFeatures.active = new SupportedRenderingFeatures()
float3 TransformObjectToWorldNormal(float3 normalOS)
{
#ifdef UNITY_ASSUME_UNIFORM_SCALING
return UnityObjectToWorldDir(normalOS);
return TransformObjectToWorldDir(normalOS);
// mul(IT_M, norm) => mul(norm, I_M) => {dot(norm, I_M.col0), dot(norm, I_M.col1), dot(norm, I_M.col2)}
return normalize(mul(normalOS, (float3x3)GetWorldToObjectMatrix()));
#endif
}
real3 TransformObjectToWorldNormal(real3 normalOS)
return normalize(mul(normalOS, (real3x3)GetWorldToObjectMatrix()));