-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
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
unable to save specific code #42
Comments
Still happens in 2020, of course #ifdef GL_ES
precision mediump float;
#endif
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
#define TAU 6.28318530718
#define MAX_ITER 5
void main( void ) {
float t = time * .5+23.0;
// uv should be the 0-1 uv of texture...
vec2 xy = gl_FragCoord.xy / resolution.yy -vec2(0.5);
vec2 uv = vec2(
atan(xy.y, xy.x) * 7.0 / TAU,
log(length(xy)) * 0.8
);
vec2 p = mod(uv*TAU, TAU)-250.0;
vec2 i = vec2(p);
float c = 0.8;
float inten = .005;
for (int n = 0; n < MAX_ITER; n++)
{
float t = t * (1.0 - (3.5 / float(n+1)));
i = p + vec2(cos(t - i.x) + sin(t + i.y), sin(t - i.y) + cos(t + i.x));
c += 1.0/length(vec2(p.x / (sin(i.x+t)/inten),p.y / (cos(i.y+t)/inten)));
}
c /= float(MAX_ITER);
c = 1.17-pow(c, 1.4);
vec3 colour = vec3(pow(abs(c), 8.0));
colour = clamp(colour + vec3(
0.20 + 0.40 * (1.0 + cos(time * 2.0 + length(uv.y) * 3.0)),
0.10 + 0.15 * (1.0 + sin(time * 3.0 + length(uv.y) * 7.0)),
0.05 + 0.05 * (1.0 + cos(time * 5.0 + length(uv.y) * 9.0))
), 0.0, 1.0);
gl_FragColor = vec4(colour, 1.0);
} |
the original code from #42 (comment) can be saved now, but not the code from #42 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it was saving ok until I changed sin to cos in gl_FragColor = ... line.
won't accept it as new code either.
The text was updated successfully, but these errors were encountered: