From 139f685f6c8655cb0e75a0c97ca39bf429956240 Mon Sep 17 00:00:00 2001 From: Stephane Laroche Date: Fri, 17 Apr 2020 03:49:15 -0400 Subject: [PATCH] AxF fix: Use CALCULATE_TEXTURE2D_LOD macro for future cross platform compatibility (Metal) --- .../Runtime/Material/AxF/AxFData.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl index 48fd3724431..0e0996a22c1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/AxF/AxFData.hlsl @@ -113,7 +113,7 @@ void GetSurfaceAndBuiltinData(FragInputs input, float3 V, inout PositionInputs p // Create mirrored UVs to hide flakes tiling surfaceData.flakesUV = _CarPaint2_FlakeTiling * UV0; - surfaceData.flakesMipLevel = _CarPaint2_BTFFlakeMap.CalculateLevelOfDetail(sampler_CarPaint2_BTFFlakeMap, surfaceData.flakesUV); + surfaceData.flakesMipLevel = CALCULATE_TEXTURE2D_LOD(_CarPaint2_BTFFlakeMap, sampler_CarPaint2_BTFFlakeMap, surfaceData.flakesUV); // TODO_FLAKES: this isn't really tiling if ((int(surfaceData.flakesUV.y) & 1) == 0)