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
@@ -155,7 +155,10 @@ bool ShadersCompilation::Compile(ShaderCompilationOptions& options)
// Process shader source to collect metadata
ShaderMeta meta;
if (ShaderProcessing::Parser::Process(options.TargetName, options.Source, options.SourceLength, options.Macros, options.Profile, &meta))
auto shaderFeatures = RenderTools::GetShaderProfileFeatures(options.Profile);
if (options.DevelopmentShaders)
shaderFeatures |= ShaderProfileFeatures::DevelopmentShaders;
if (ShaderProcessing::Parser::Process(options.TargetName, options.Source, options.SourceLength, options.Macros, options.Profile, shaderFeatures , &meta))
{
LOG(Warning, "Failed to parse source code.");
return true;