Bug #190
Graphic pack expressions outputted in shaders get localized
Description
Tested with Cemu 1.15.13c, 1.15.5, 1.15.11 and 1.15.0 to find out if it's a regression or if it's just the same bug that we knew about a long time back.
The problem:¶
When using a language that uses comma as decimal separators instead of dots, like Italian, Dutch etc. Cemu will output something that OpenGL can't handle. Which will give one of these errors while compiling that shader:
Log.txt errors shown:
AMD: error(#132) Syntax error: "32.0" parse error
Nvidia: error C0000: syntax error, unexpected floating point constant at token "<float-const>"
Testing¶
I've used an opengl wrapper to check what it passes to the glShaderSource call to get a definitive answer to what was getting outputted.
Setup:
rules.txt file:
[Preset]
name = Test Preset
$testVariable = 32.0
314fe815e6dbbef5_000000000000001d_ps.txt file:
const float expressionTestVariable = $testVariable;
Output:
With English set as Cemu's interface language:
const float expressionTestVariable = 0.93;
With Italian set as Cemu's interface language:
const float expressionTestVariable = 0,93.0;
I've included a simple graphic pack for Shovel Knight with a shader from the intro logo to replicate this quickly.
Files