Added trigger
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 1m33s
CI / Windows Release Package (push) Successful in 2m4s

This commit is contained in:
2026-05-06 14:01:23 +10:00
parent e59677c212
commit 6502344d0a
16 changed files with 235 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ std::string SlangCBufferTypeForParameter(ShaderParameterType type)
case ShaderParameterType::Boolean: return "bool";
case ShaderParameterType::Enum: return "int";
case ShaderParameterType::Text: return "";
case ShaderParameterType::Trigger: return "int";
}
return "float";
}
@@ -52,6 +53,12 @@ std::string BuildParameterUniforms(const std::vector<ShaderParameterDefinition>&
{
if (definition.type == ShaderParameterType::Text)
continue;
if (definition.type == ShaderParameterType::Trigger)
{
source << "\tint " << definition.id << ";\n";
source << "\tfloat " << definition.id << "Time;\n";
continue;
}
source << "\t" << SlangCBufferTypeForParameter(definition.type) << " " << definition.id << ";\n";
}
return source.str();