Optimize development-only shaders and rendering code to compile it out in Release game builds

This commit is contained in:
2026-06-25 11:21:13 +02:00
parent be87583cb2
commit a3694203a2
64 changed files with 252 additions and 121 deletions
+2 -2
View File
@@ -402,7 +402,7 @@ void StaticModel::Draw(RenderContext& renderContext)
draw.SortOrder = _sortOrder;
draw.VertexColors = _vertexColorsCount ? _vertexColorsBuffer : nullptr;
draw.SetStencilValue(_layer);
#if USE_EDITOR
#if GPU_ENABLE_DEVELOPMENT
if (HasStaticFlag(StaticFlags::Lightmap))
draw.LightmapScale = _scaleInLightmap;
#endif
@@ -439,7 +439,7 @@ void StaticModel::Draw(RenderContextBatch& renderContextBatch)
draw.SortOrder = _sortOrder;
draw.VertexColors = _vertexColorsCount ? _vertexColorsBuffer : nullptr;
draw.SetStencilValue(_layer);
#if USE_EDITOR
#if GPU_ENABLE_DEVELOPMENT
if (HasStaticFlag(StaticFlags::Lightmap))
draw.LightmapScale = _scaleInLightmap;
#endif