mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-19 19:16:34 +00:00
Establish correct range of output.
This commit is contained in:
@@ -677,7 +677,7 @@ void ScanTarget::update(const int output_width, const int output_height) {
|
||||
|
||||
if(is_composite(existing_modals_->display_type)) {
|
||||
separation_buffer_.bind_framebuffer();
|
||||
composition_shader_.bind();
|
||||
separation_shader_.bind();
|
||||
test_gl([&]{ glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, GLsizei(num_dirty_zones)); });
|
||||
}
|
||||
|
||||
@@ -812,7 +812,7 @@ void ScanTarget::draw(int output_width, int output_height) {
|
||||
// Copy the accumulation texture to the target.
|
||||
test_gl([&]{ glBindFramebuffer(GL_FRAMEBUFFER, target_framebuffer_); });
|
||||
test_gl([&]{ glViewport(0, 0, (GLsizei)output_width, (GLsizei)output_height); });
|
||||
copy_shader_.perform(SeparationTextureUnit); // CompositionTextureUnit
|
||||
copy_shader_.perform(SeparationTextureUnit); //
|
||||
}
|
||||
|
||||
is_drawing_to_accumulation_buffer_.clear(std::memory_order_release);
|
||||
|
||||
@@ -66,9 +66,7 @@ void main(void) {
|
||||
coordinates[30] = vec2(centreX + 15.0, sampleY) / bufferSize;
|
||||
|
||||
gl_Position = vec4(
|
||||
// (vec2(centreX, sampleY) / bufferSize - vec2(0.5)) * vec2(2.0),
|
||||
lateral,
|
||||
longitudinal,
|
||||
(vec2(centreX, sampleY) / bufferSize - vec2(0.5)) * vec2(2.0),
|
||||
0.0,
|
||||
1.0
|
||||
);
|
||||
@@ -122,7 +120,7 @@ void main(void) {
|
||||
filterCoefficients[30] * texture(source, coordinates[30]).x;
|
||||
|
||||
outputColour = vec4(
|
||||
1.0, 1.0, 0.0, 1.0);
|
||||
coordinates[15], 0.0, 1.0);
|
||||
// channels.x,
|
||||
// channels.y * centre.yz,
|
||||
// 1.0
|
||||
@@ -174,7 +172,7 @@ OpenGL::Shader OpenGL::separation_shader(
|
||||
//
|
||||
// Set uniforms.
|
||||
//
|
||||
shader.set_uniform("samplesPerLine", samples_per_line);
|
||||
shader.set_uniform("samplesPerLine", float(samples_per_line));
|
||||
shader.set_uniform("bufferSize", float(buffer_width), float(buffer_height));
|
||||
shader.set_uniform("source", GLint(source_texture_unit - GL_TEXTURE0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user