Fix lightmap uvs density view to handle scale in lightmap and outline non-static objects

#2080
This commit is contained in:
Wojtek Figat
2024-09-09 05:59:17 +02:00
parent fc9aa5c184
commit 545e59aba5
9 changed files with 42 additions and 76 deletions

View File

@@ -98,7 +98,11 @@ void PS(in PixelInput input, out float4 Light : SV_Target0, out float4 RT0 : SV_
float3 minColor = float3(235/255.0, 52/255.0, 67/255.0);
float3 bestColor = float3(51/255.0, 235/255.0, 70/255.0);
float3 maxColor = float3(52/255.0, 149/255.0, 235/255.0);
if (density < bestDensity)
if (LightmapSize < 0.0f)
{
color = float3(52/255.0, 229/255.0, 235/255.0); // No lightmap
}
else if (density < bestDensity)
{
color = lerp(minColor, bestColor, (density - minDensity) / (bestDensity - minDensity));
}