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

@@ -494,6 +494,10 @@ void Foliage::DrawType(RenderContext& renderContext, const FoliageType& type, Dr
batch.DrawCall.Surface.GeometrySize = mesh.GetBox().GetSize();
batch.DrawCall.Surface.Skinning = nullptr;
batch.DrawCall.WorldDeterminantSign = 1;
#if USE_EDITOR
if (renderContext.View.Mode == ViewMode::LightmapUVsDensity)
batch.DrawCall.Surface.LODDitherFactor = type.ScaleInLightmap; // See LightmapUVsDensityMaterialShader
#endif
if (EnumHasAnyFlags(drawModes, DrawPass::Forward))
{