1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-20 10:17:05 +00:00

Set source texture unit.

This commit is contained in:
Thomas Harte
2026-01-28 20:46:24 -05:00
parent e72ab3dd01
commit de8d9e6e0c
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -336,7 +336,8 @@ OpenGL::Shader OpenGL::composition_shader(
const int source_width,
const int source_height,
const int target_width,
const int target_height
const int target_height,
const GLenum source_texture_unit
) {
//
// Compose and compiler shader.
@@ -416,6 +417,7 @@ OpenGL::Shader OpenGL::composition_shader(
shader.set_uniform("cyclesSinceRetraceMultiplier", cycles_multiplier);
shader.set_uniform("sourceSize", float(source_width), float(source_height));
shader.set_uniform("targetSize", float(target_width), float(target_height));
shader.set_uniform("source", GLint(source_texture_unit - GL_TEXTURE0));
return shader;
}
+2 -1
View File
@@ -48,7 +48,8 @@ Shader composition_shader(
int source_width,
int source_height,
int target_width,
int target_height
int target_height,
GLenum source_texture_unit
);
}
+2 -1
View File
@@ -141,7 +141,8 @@ ScanTarget::ScanTarget(const API api, const GLuint target_framebuffer, const flo
pair.second,
sample_multiplier,
2048, 2048,
buffer_width, 2048
buffer_width, 2048,
GL_TEXTURE0
).bind();
}
}