mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Restores S-Video through line, as monochrome.
This commit is contained in:
parent
eecd4417e7
commit
1cd6d58f17
@ -320,27 +320,13 @@ std::unique_ptr<Shader> ScanTarget::conversion_shader() const {
|
|||||||
case DisplayType::SVideo:
|
case DisplayType::SVideo:
|
||||||
fragment_shader +=
|
fragment_shader +=
|
||||||
// Sample four times over, at proper angle offsets.
|
// Sample four times over, at proper angle offsets.
|
||||||
"vec2 samples[4] = vec2[4]("
|
"vec2 sample = svideo_sample(textureCoordinates[1], compositeAngle);"
|
||||||
"svideo_sample(textureCoordinates[0], angles[0]),"
|
|
||||||
"svideo_sample(textureCoordinates[1], angles[1]),"
|
|
||||||
"svideo_sample(textureCoordinates[2], angles[2]),"
|
|
||||||
"svideo_sample(textureCoordinates[3], angles[3])"
|
|
||||||
");"
|
|
||||||
"vec4 chrominances = vec4("
|
|
||||||
"samples[0].y,"
|
|
||||||
"samples[1].y,"
|
|
||||||
"samples[2].y,"
|
|
||||||
"samples[3].y"
|
|
||||||
");"
|
|
||||||
|
|
||||||
// Split and average chrominance.
|
// Split and average chrominance.
|
||||||
"vec2 channels = vec2("
|
"vec2 channels = vec2(0.0, 0.0);"
|
||||||
"dot(cos(angles), chrominances),"
|
|
||||||
"dot(sin(angles), chrominances)"
|
|
||||||
") * vec2(0.25);"
|
|
||||||
|
|
||||||
// Apply a colour space conversion to get RGB.
|
// Apply a colour space conversion to get RGB.
|
||||||
"fragColour3 = lumaChromaToRGB * vec3(samples[1].x, channels);";
|
"fragColour3 = lumaChromaToRGB * vec3(sample.r, channels);";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DisplayType::CompositeColour:
|
case DisplayType::CompositeColour:
|
||||||
@ -593,7 +579,7 @@ std::unique_ptr<Shader> ScanTarget::qam_separation_shader() const {
|
|||||||
|
|
||||||
if(is_svideo) {
|
if(is_svideo) {
|
||||||
vertex_shader +=
|
vertex_shader +=
|
||||||
"textureCoordinate = vec2(centreClock + textureCoordinateOffsets[0], lineY + 0.5) / textureSize(textureName, 0)";
|
"textureCoordinate = vec2(centreClock, lineY + 0.5) / textureSize(textureName, 0);";
|
||||||
} else {
|
} else {
|
||||||
vertex_shader +=
|
vertex_shader +=
|
||||||
"textureCoordinates[0] = vec2(centreClock + textureCoordinateOffsets[0], lineY + 0.5) / textureSize(textureName, 0);"
|
"textureCoordinates[0] = vec2(centreClock + textureCoordinateOffsets[0], lineY + 0.5) / textureSize(textureName, 0);"
|
||||||
|
Loading…
Reference in New Issue
Block a user