Changed defaults

This commit is contained in:
2026-05-21 15:08:36 +10:00
parent a9eeed30cf
commit 09efe2d6a0
6 changed files with 30 additions and 9 deletions

View File

@@ -52,7 +52,10 @@ std::string BuildParameterUniforms(const std::vector<ShaderParameterDefinition>&
for (const ShaderParameterDefinition& definition : parameters)
{
if (definition.type == ShaderParameterType::Text)
{
source << "\tfloat " << definition.id << "TextureWidthScale;\n";
continue;
}
if (definition.type == ShaderParameterType::Trigger)
{
source << "\tint " << definition.id << ";\n";
@@ -109,7 +112,7 @@ std::string BuildTextHelpers(const std::vector<ShaderParameterDefinition>& param
<< "{\n"
<< "\tif (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0)\n"
<< "\t\treturn 0.0;\n"
<< "\treturn " << definition.id << "Texture.Sample(uv).r;\n"
<< "\treturn " << definition.id << "Texture.Sample(float2(uv.x * " << definition.id << "TextureWidthScale, uv.y)).r;\n"
<< "}\n\n"
<< "float4 draw" << suffix << "(float2 uv, float4 fillColor)\n"
<< "{\n"