mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-21 17:16:44 +00:00
Shunts output shader to its proper place.
This commit is contained in:
@@ -421,7 +421,36 @@ std::unique_ptr<Shader> ScanTarget::composition_shader(InputDataType input_data_
|
||||
}
|
||||
|
||||
std::unique_ptr<Shader> ScanTarget::conversion_shader(InputDataType input_data_type, DisplayType display_type, int colour_cycle_numerator, int colour_cycle_denominator, int processing_width) {
|
||||
return nullptr;
|
||||
return std::unique_ptr<Shader>(new Shader(
|
||||
glsl_globals(ShaderType::Line) + glsl_default_vertex_shader(ShaderType::Line),
|
||||
"#version 150\n"
|
||||
|
||||
"out vec4 fragColour;"
|
||||
"in vec2 textureCoordinate;"
|
||||
|
||||
"uniform sampler2D textureName;"
|
||||
|
||||
"void main(void) {"
|
||||
"fragColour = vec4(texture(textureName, textureCoordinate).rgb, 0.64);"
|
||||
"}",
|
||||
attribute_bindings(ShaderType::Line)
|
||||
));
|
||||
|
||||
// switch(modals_.composite_colour_space) {
|
||||
// case ColourSpace::YIQ: {
|
||||
// const GLfloat rgbToYIQ[] = {0.299f, 0.596f, 0.211f, 0.587f, -0.274f, -0.523f, 0.114f, -0.322f, 0.312f};
|
||||
// const GLfloat yiqToRGB[] = {1.0f, 1.0f, 1.0f, 0.956f, -0.272f, -1.106f, 0.621f, -0.647f, 1.703f};
|
||||
// shader->set_uniform_matrix("lumaChromaToRGB", 3, false, yiqToRGB);
|
||||
// shader->set_uniform_matrix("rgbToLumaChroma", 3, false, rgbToYIQ);
|
||||
// } break;
|
||||
//
|
||||
// case ColourSpace::YUV: {
|
||||
// const GLfloat rgbToYUV[] = {0.299f, -0.14713f, 0.615f, 0.587f, -0.28886f, -0.51499f, 0.114f, 0.436f, -0.10001f};
|
||||
// const GLfloat yuvToRGB[] = {1.0f, 1.0f, 1.0f, 0.0f, -0.39465f, 2.03211f, 1.13983f, -0.58060f, 0.0f};
|
||||
// shader->set_uniform_matrix("lumaChromaToRGB", 3, false, yuvToRGB);
|
||||
// shader->set_uniform_matrix("rgbToLumaChroma", 3, false, rgbToYUV);
|
||||
// } break;
|
||||
// }
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user