diff --git a/Outputs/CRT/Internals/CRTOpenGL.cpp b/Outputs/CRT/Internals/CRTOpenGL.cpp index d9734646f..55c2a0053 100644 --- a/Outputs/CRT/Internals/CRTOpenGL.cpp +++ b/Outputs/CRT/Internals/CRTOpenGL.cpp @@ -429,12 +429,12 @@ void OpenGLOutputBuilder::set_timing_uniforms() { composite_separation_filter_program_->set_width_scalers(output_width, output_width); composite_separation_filter_program_->set_separation_frequency(sample_cycles_per_line, colour_subcarrier_frequency); - composite_separation_filter_program_->set_phase_cycles_per_sample(0.25f, 6.0f); + composite_separation_filter_program_->set_extension(6.0f); } if(composite_chrominance_filter_shader_program_) { composite_chrominance_filter_shader_program_->set_width_scalers(output_width, output_width); - composite_chrominance_filter_shader_program_->set_phase_cycles_per_sample(0.25f, 5.0f); + composite_chrominance_filter_shader_program_->set_extension(5.0f); } if(rgb_filter_shader_program_) { @@ -449,7 +449,7 @@ void OpenGLOutputBuilder::set_timing_uniforms() if(composite_input_shader_program_) { composite_input_shader_program_->set_width_scalers(1.0f, output_width); - composite_input_shader_program_->set_phase_cycles_per_sample(0.25f, 0.0f); + composite_input_shader_program_->set_extension(0.0f); } if(rgb_input_shader_program_) { diff --git a/Outputs/CRT/Internals/Shaders/IntermediateShader.cpp b/Outputs/CRT/Internals/Shaders/IntermediateShader.cpp index ebda43d6d..cbc7dbbb1 100644 --- a/Outputs/CRT/Internals/Shaders/IntermediateShader.cpp +++ b/Outputs/CRT/Internals/Shaders/IntermediateShader.cpp @@ -40,7 +40,6 @@ std::unique_ptr IntermediateShader::make_shader(const char * "in vec2 ends;" "in vec3 phaseTimeAndAmplitude;" - "uniform float phaseCyclesPerTick;" "uniform ivec2 outputTextureSize;" "uniform float extension;" "uniform %s texID;" @@ -94,7 +93,7 @@ std::unique_ptr IntermediateShader::make_shader(const char * // setup phaseAndAmplitudeVarying.x as colour burst subcarrier phase, in radians; // setup phaseAndAmplitudeVarying.x as colour burst amplitude - "phaseAndAmplitudeVarying.x = (phaseCyclesPerTick * (extendedOutputPosition.x - phaseTimeAndAmplitude.y) + (phaseTimeAndAmplitude.x / 256.0)) * 2.0 * 3.141592654;" + "phaseAndAmplitudeVarying.x = (((extendedOutputPosition.x - phaseTimeAndAmplitude.y) / 4.0) + (phaseTimeAndAmplitude.x / 256.0)) * 2.0 * 3.141592654;" "phaseAndAmplitudeVarying.y = 0.33;" // TODO: reinstate connection with (phaseTimeAndAmplitude.y/256.0) // determine output position by scaling the output position according to the texture size @@ -461,9 +460,8 @@ void IntermediateShader::set_separation_frequency(float sampling_rate, float col set_filter_coefficients(sampling_rate, colour_burst_frequency); } -void IntermediateShader::set_phase_cycles_per_sample(float phase_cycles_per_sample, float extension) +void IntermediateShader::set_extension(float extension) { - set_uniform("phaseCyclesPerTick", (GLfloat)phase_cycles_per_sample); set_uniform("extension", extension); } diff --git a/Outputs/CRT/Internals/Shaders/IntermediateShader.hpp b/Outputs/CRT/Internals/Shaders/IntermediateShader.hpp index 08a3c6e89..13dedc2c4 100644 --- a/Outputs/CRT/Internals/Shaders/IntermediateShader.hpp +++ b/Outputs/CRT/Internals/Shaders/IntermediateShader.hpp @@ -76,7 +76,7 @@ public: geometry should be extended so that a complete colour cycle is included at both the beginning and end, to occur upon the next `bind`. */ - void set_phase_cycles_per_sample(float phase_cycles_per_sample, float extension); + void set_extension(float extension); /*! Queues setting the matrices that convert between RGB and chrominance/luminance to occur on the next `bind`.