From d7c0f0c8048d3fb622e3389518ebf0f4ecce9d8f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 24 Nov 2018 18:03:44 -0500 Subject: [PATCH] Switches to an ordinary sampler for scan processing. --- Outputs/OpenGL/ScanTargetGLSLFragments.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp index c0c0a2626..88dd88a43 100644 --- a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp +++ b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp @@ -37,9 +37,7 @@ std::string ScanTarget::glsl_globals(ShaderType type) { "in float dataY;" "in float lineY;" - "in float compositeAmplitude;" - - "uniform usampler2D textureName;"; + "in float compositeAmplitude;"; case ShaderType::Line: return @@ -92,9 +90,13 @@ std::string ScanTarget::glsl_default_vertex_shader(ShaderType type) { std::string result; if(type == ShaderType::InputScan) { - result += "out vec2 textureCoordinate;"; + result += + "out vec2 textureCoordinate;" + "uniform usampler2D textureName;"; } else { - result += "out vec2 textureCoordinates[11];"; + result += + "out vec2 textureCoordinates[11];" + "uniform sampler2D textureName;"; } result += @@ -330,11 +332,11 @@ std::unique_ptr ScanTarget::svideo_to_rgb_shader(int colour_cycle_numera "in vec2 textureCoordinates[11];" "uniform float textureWeights[11];" - "uniform usampler2D textureName;" + "uniform sampler2D textureName;" "out vec3 fragColour;" "void main(void) {" - "vec3 textureSample = vec3(texture(textureName, textureCoordinates[5]).rgb) / vec3(65536.0 * 16384.0);" + "vec3 textureSample = texture(textureName, textureCoordinates[5]).rgb;" "fragColour = textureSample;" "}", attribute_bindings(ShaderType::ProcessedScan)