aboutsummaryrefslogtreecommitdiff
path: root/src/shader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader.c')
-rw-r--r--src/shader.c6
1 files changed, 6 insertions, 0 deletions
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));