Add ShaderProfileFeatures for more expendable shader feature sets

This commit is contained in:
Wojtek Figat
2026-03-04 16:55:04 +01:00
parent aff8090adb
commit ceebc68d18
12 changed files with 121 additions and 49 deletions

View File

@@ -467,10 +467,6 @@ void Material::OnDependencyModified(BinaryAsset* asset)
Reload();
}
#endif
#if USE_EDITOR
void Material::InitCompilationOptions(ShaderCompilationOptions& options)
{
// Base
@@ -488,7 +484,7 @@ void Material::InitCompilationOptions(ShaderCompilationOptions& options)
const bool useForward = ((info.Domain == MaterialDomain::Surface || info.Domain == MaterialDomain::Deformable) && !isOpaque) || info.Domain == MaterialDomain::Particle;
const bool useTess =
info.TessellationMode != TessellationMethod::None &&
RenderTools::CanSupportTessellation(options.Profile) && isSurfaceOrTerrainOrDeformable;
EnumHasAllFlags(RenderTools::GetShaderProfileFeatures(options.Profile), ShaderProfileFeatures::TessellationShaders) && isSurfaceOrTerrainOrDeformable;
const bool useDistortion =
(info.Domain == MaterialDomain::Surface || info.Domain == MaterialDomain::Deformable || info.Domain == MaterialDomain::Particle) &&
!isOpaque &&