+
+ // The output texture needs to have valid state to be written to by a compute shader.
+ if (phase->is_compute_shader) {
+ glActiveTexture(GL_TEXTURE0);
+ check_error();
+ glBindTexture(GL_TEXTURE_2D, (*output_textures)[phase]);
+ check_error();
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ check_error();
+ }