Open Elektraglide opened 2 hours ago
Which version of Shader Minifier are you using? I think we fixed some instances of the bug.
Can you share the line of code that triggers the bug?
My guess is, it's this rewrite: x*(y*z) -> y*z*x
How to reproduce:
mat2 f(){ return mat3x2(1) * (mat4x3(1) * mat2x4(1)); }
becomes
mat2 f(){return mat4x3(1)*mat2x4(1)*mat3x2(1);}
Damn, thats a quick response! I had edited my post having looked atthe source code. Is rewriter.fs:240 the problem?
No, but commenting out lines 198-200 of rewriter.fs should fix it
yep, that works. cheers
Good point, we need a --version
flag. :)
The version number is included in (some of) the generated outputs, but you can also run .\shader_minifier.exe --help
and look at the first line.
you cannot swap order of multiplies for matrices; it changes the meaning. I have vec4 v = mat33 (vec3 float) which is transformed into: vec4 v = (vec3 float) mat33
Is rewriter.fs:240 the problem?