diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-05-20 12:42:39 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-05-20 12:42:39 +0200 |
| commit | 5d6b59778a7346317ddfc549c350c0960a7a54a7 (patch) | |
| tree | 85d85e59ae8943ee486aebfe2b0760f0ee3a5b8e /src/shader.c | |
| parent | b9915d27b0a21a97540d6ed193f338da3732e1a1 (diff) | |
| download | mandelbrot-5d6b59778a7346317ddfc549c350c0960a7a54a7.tar.gz mandelbrot-5d6b59778a7346317ddfc549c350c0960a7a54a7.tar.bz2 mandelbrot-5d6b59778a7346317ddfc549c350c0960a7a54a7.zip | |
Added Smoothness and super sampling
Diffstat (limited to 'src/shader.c')
| -rw-r--r-- | src/shader.c | 6 |
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)); |
