From 5d6b59778a7346317ddfc549c350c0960a7a54a7 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 20 May 2020 12:42:39 +0200 Subject: Added Smoothness and super sampling --- src/shader.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/shader.c') diff --git a/src/shader.c b/src/shader.c index 68295ab..52c8df8 100644 --- a/src/shader.c +++ b/src/shader.c @@ -30,6 +30,8 @@ bool shader_init(Shader *shader) || (shader->location.imag_start = st_get_location(shader->id, "u_imag_start")) == -1 || (shader->location.imag_end = st_get_location(shader->id, "u_imag_end")) == -1 || (shader->location.iterations = st_get_location(shader->id, "u_iterations")) == -1 + || (shader->location.smooth = st_get_location(shader->id, "u_smooth")) == -1 + || (shader->location.samples = st_get_location(shader->id, "u_samples")) == -1 || (shader->location.texture = st_get_location(shader->id, "u_texture")) == -1) return false; return true; @@ -55,6 +57,10 @@ void shader_set_uniforms(Shader *shader, State *state) GL_CALL(glUniform1i(shader->location.iterations, state->iterations)); + GL_CALL(glUniform1i(shader->location.smooth, state->smooth)); + + GL_CALL(glUniform1f(shader->location.samples, state->samples)); + GL_CALL(glUniform1i(shader->location.texture, 0)); GL_CALL(glActiveTexture(GL_TEXTURE0)); GL_CALL(glBindTexture(GL_TEXTURE_1D, state->texture)); -- cgit