We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any chance of adding a separate option for this?
Input:
float f(){ float r = 1.; return r; } vec2 pos = vec2(0.5); void main(){ gl_FragColor = vec4(1.); }
Current output:
float n(){return 1.;}vec2 r=vec2(.5);void main(){gl_FragColor=vec4(1.);}
Desired:
void main(){gl_FragColor=vec4(1.);}
The text was updated successfully, but these errors were encountered:
Partially implemented in #182, more work is needed.
Sorry, something went wrong.
Also it should be extended to remove unused overloads
Input example:
#version 300 es /* contributors: [Stefan Gustavson, Ian McEwan] description: modulus of 289 use: mod289(<float|vec2|vec3|vec4> x) */ // #ifndef FNC_MOD289 // #define FNC_MOD289 float mod289(const in float x) { return x - floor(x * (1. / 289.)) * 289.; } vec2 mod289(const in vec2 x) { return x - floor(x * (1. / 289.)) * 289.; } vec3 mod289(const in vec3 x) { return x - floor(x * (1. / 289.)) * 289.; } vec4 mod289(const in vec4 x) { return x - floor(x * (1. / 289.)) * 289.; } // #endif in vec4 v_aaa; out vec4 color; void main(){ color = mod289(v_aaa); }
Current output (1.3.6):
#version 300 es float v(const float v) { return v-floor(v*(1./289.))*289.; } vec2 v(const vec2 v) { return v-floor(v*(1./289.))*289.; } vec3 v(const vec3 v) { return v-floor(v*(1./289.))*289.; } vec4 v(const vec4 v) { return v-floor(v*(1./289.))*289.; } in vec4 v_aaa; out vec4 color; void main() { color=v(v_aaa); }
No branches or pull requests
Any chance of adding a separate option for this?
Input:
Current output:
Desired:
The text was updated successfully, but these errors were encountered: