Shader_Minifier icon indicating copy to clipboard operation
Shader_Minifier copied to clipboard

Minify and obfuscate GLSL or HLSL code

Results 85 Shader_Minifier issues
Sort by recently updated
recently updated
newest added

Hello, The minifier doesn't consider `#define/#undef` and doesn't optimize `#if` blocks Example input: ```glsl #define MUT_0 #undef MUT_1 float f(){ float r = 1.; #ifdef MUT_0 r = mut0(r); #endif...

If there's a `#define` in a file, but the macro is not used anywhere, we should delete it. With the preprocessor, this will become common: ```glsl #define PRETTIER 1 #ifdef...

Great tool! Was able to handle all regular HLSL shaders I threw at it so far. However, would it be possible to add support for ReShade FX? ReShade is a...

There are more cases where we could replace a float with an int (`1` instead of `1.`). See discussion in https://www.pouet.net/topic.php?which=12089&page=1 Quote from the spec: > The OpenGL Shading Language...

The behavior is documented (https://github.com/laurentlb/Shader_Minifier#unused-local-variables), but it can be risky to remove the initialization code of a variable that is not used. Code example: ```glsl out vec4 outcolor; float glow...

Love this tool, was super helpful for JS13K Games competition, but I find myself having to modify the output every time I run it due to its usage of very...

It would be useful to have a command option for a list of things that *should* be renamed, in case they aren't. Since this would be useful primarily as a...

We should replace `+= 1.` with `++`. This should work both on ints and on floats. Same for the `--` operator. ```glsl a += 1.; ```