mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-13 22:32:03 +00:00
Experimental: up the chroma accuracy, just let the luma go straight through. Subject to figuring out how I'm still losing so much precision.
This commit is contained in:
parent
a836120945
commit
aa7774a9a6
@ -398,7 +398,7 @@ void OpenGLOutputBuilder::set_timing_uniforms()
|
||||
if(composite_chrominance_filter_shader_program_)
|
||||
{
|
||||
composite_chrominance_filter_shader_program_->set_width_scalers(output_width, output_width);
|
||||
composite_chrominance_filter_shader_program_->set_filter_coefficients(sample_cycles_per_line, colour_subcarrier_frequency * 0.5f);
|
||||
composite_chrominance_filter_shader_program_->set_filter_coefficients(sample_cycles_per_line, colour_subcarrier_frequency);
|
||||
}
|
||||
if(rgb_filter_shader_program_)
|
||||
{
|
||||
|
@ -302,34 +302,35 @@ std::unique_ptr<IntermediateShader> IntermediateShader::make_luma_filter_shader(
|
||||
|
||||
"void main(void)"
|
||||
"{"
|
||||
"vec3 samples[] = vec3[]("
|
||||
"texture(texID, inputPositionsVarying[0]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[1]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[2]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[3]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[4]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[5]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[6]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[7]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[8]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[9]).rgb,"
|
||||
"texture(texID, inputPositionsVarying[10]).rgb"
|
||||
");"
|
||||
// "vec3 samples[] = vec3[]("
|
||||
// "texture(texID, inputPositionsVarying[0]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[1]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[2]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[3]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[4]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[5]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[6]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[7]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[8]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[9]).rgb,"
|
||||
// "texture(texID, inputPositionsVarying[10]).rgb"
|
||||
// ");"
|
||||
//
|
||||
// "vec4 luminance[] = vec4[]("
|
||||
// "vec4(samples[0].r, samples[1].r, samples[2].r, samples[3].r),"
|
||||
// "vec4(samples[4].r, samples[5].r, samples[6].r, samples[7].r),"
|
||||
// "vec4(samples[8].r, samples[9].r, samples[10].r, 0.0)"
|
||||
// ");"
|
||||
|
||||
"vec4 luminance[] = vec4[]("
|
||||
"vec4(samples[0].r, samples[1].r, samples[2].r, samples[3].r),"
|
||||
"vec4(samples[4].r, samples[5].r, samples[6].r, samples[7].r),"
|
||||
"vec4(samples[8].r, samples[9].r, samples[10].r, 0.0)"
|
||||
");"
|
||||
|
||||
"fragColour = vec3("
|
||||
"dot(vec3("
|
||||
"dot(luminance[0], weights[0]),"
|
||||
"dot(luminance[1], weights[1]),"
|
||||
"dot(luminance[2], weights[2])"
|
||||
"), vec3(1.0)),"
|
||||
"samples[5].gb"
|
||||
");"
|
||||
// "fragColour = vec3("
|
||||
// "dot(vec3("
|
||||
// "dot(luminance[0], weights[0]),"
|
||||
// "dot(luminance[1], weights[1]),"
|
||||
// "dot(luminance[2], weights[2])"
|
||||
// "), vec3(1.0)),"
|
||||
// "samples[5].gb"
|
||||
// ");"
|
||||
"fragColour = texture(texID, inputPositionsVarying[5]).rgb;"//lumaChromaToRGB * lumaChromaColourInRange;"
|
||||
"}", false, false);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user