diff --git a/examples/wavy.glsl b/examples/wavy.glsl index 2c5a3a0..af67ee9 100644 --- a/examples/wavy.glsl +++ b/examples/wavy.glsl @@ -24,9 +24,15 @@ void mainImage(out vec4 fragColor, in vec2 fragCoord) { lines_uv.y += sin(lines_timescale * 0.2 + lines_uv.x * 5.0) * 0.2; lines_uv.x += sin(lines_timescale + lines_uv.y * 30.0) * 0.2;// * sin(lines_timescale); float hor_lines = sin(lines_uv.x * 10.0)/2.0 + 0.5; - hor_lines = sign(hor_lines -0.5); + float extra_hor_lines = hor_lines; + // clipped with AA + hor_lines = extra_hor_lines; //sign(hor_lines -0.5); + //hor_lines = sin(iTime * 3.0 +hor_lines * 2.0 + uv.y / 50.0); + + //fragColor = vec4(uv.x, uv.y, 1.0, 1.0); - fragColor = vec4(hor_lines * 0.7, inverse_distance * 0.55, inverse_distance * 0.75, 1.0); + float frac = 0.50; + fragColor = vec4(hor_lines * frac, hor_lines * frac, hor_lines * frac + 0.4, 1.0); } diff --git a/flake.nix b/flake.nix index 018044f..570f289 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,8 @@ ]; buildInputs = with pkgs; [ libGL + libpng + libjpeg ]; makeFlags = [ "PREFIX=$(out)" ]; }; diff --git a/renderer.c b/renderer.c index ed7c345..d8459ac 100644 --- a/renderer.c +++ b/renderer.c @@ -3,8 +3,10 @@ #include #include #include +#include #include "renderer.h" + /// returns 0 if failed. GLuint compile_shader(GLuint type, const char *src) { GLuint id = glCreateShader(type);