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

I have a rather big shader with lots of small functions (600+ lines) that is working correctly before running the minifying tool on it. When I minify it I get...

Very helpful project, thank you. The code `vec4 main() { vec4 bb; return bb; }` minimizes to `vec4 main(){return bb;}` The original is clearly bad code but according to the...

When using (global) variables like ``` glsl float a = 4; vec3 b = vec3(a / 8, a / 8, 0); ``` the variable `a` gets inlined, but the information...

Sometimes, we use include to insert shader fragments, and when processing these fragment files separately, duplicate naming may occur. We hope to add a unified prefix or suffix to avoid...

input shader ```precision highp float; varying vec2 v_texcoordOut; uniform sampler2D s_texture; uniform float u_degree; uniform float u_degree2; void main(void) { vec2 texcoord = v_texcoordOut; if(u_degree > 0.001) { if(u_degree2 >...

``` precision highp float; varying vec2 v_texcoordOut; uniform sampler2D s_texture; uniform float u_degree; uniform float u_degree2; void main(void) { #ifdef ALPHA_1 float alpha = 1.0; #else float alpha = 0.5;...

For some reason if shader doesn't end with an empty line it throws: ``` System.Exception: Parse error: Error in ./test/s.glsl: Ln: 3 Col: 2 } ^ Note: The error occurred...

Currently the minifier leaves structs untouched, would be great if it would support them!

```glsl out vec4 fragColor; const float t = 1.5+(1.+.5); void main() { fragColor = vec4(t); } ``` Shader Minifier doesn't inline `t` here (except with `--aggressive-inlining`). After simplifying the expression,...