- unsigned int frag = VFrame::make_shader(0,
- shader_stack[0],
- shader_stack[1],
- shader_stack[2],
- shader_stack[3],
- 0);
- get_output()->bind_texture(0);
-
- if(frag)
- {
- glUseProgram(frag);
- glUniform1i(glGetUniformLocation(frag, "tex"), 0);
- glUniform1f(glGetUniformLocation(frag, "min_v"), min_v);
- glUniform1f(glGetUniformLocation(frag, "max_v"), max_v);
- glUniform1f(glGetUniformLocation(frag, "run"), run);
- glUniform1f(glGetUniformLocation(frag, "threshold"), threshold);
- glUniform1f(glGetUniformLocation(frag, "threshold_run"), threshold_run);
+ shader_stack[current_shader] = 0;
+ unsigned int shader = VFrame::make_shader(shader_stack);
+ if( shader > 0 ) {
+ get_output()->bind_texture(0);
+ glUseProgram(shader);
+ glUniform1i(glGetUniformLocation(shader, "tex"), 0);
+ glUniform1f(glGetUniformLocation(shader, "min_v"), min_v);
+ glUniform1f(glGetUniformLocation(shader, "max_v"), max_v);
+ glUniform1f(glGetUniformLocation(shader, "run"), run);
+ glUniform1f(glGetUniformLocation(shader, "threshold"), threshold);
+ glUniform1f(glGetUniformLocation(shader, "threshold_run"), threshold_run);