summaryrefslogtreecommitdiff
path: root/chart2/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/opengl')
-rw-r--r--chart2/opengl/commonFragmentShader.glsl3
-rw-r--r--chart2/opengl/screenTextFragmentShader.glsl6
-rw-r--r--chart2/opengl/textFragmentShader.glsl7
-rw-r--r--chart2/opengl/textFragmentShaderBatch.glsl2
4 files changed, 12 insertions, 6 deletions
diff --git a/chart2/opengl/commonFragmentShader.glsl b/chart2/opengl/commonFragmentShader.glsl
index d602b21a3488..bb2482b4a57b 100644
--- a/chart2/opengl/commonFragmentShader.glsl
+++ b/chart2/opengl/commonFragmentShader.glsl
@@ -10,10 +10,11 @@
#version 150 core
in vec4 fragmentColor;
+out vec4 actualColor;
void main()
{
- gl_FragColor = fragmentColor;
+ actualColor = fragmentColor;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/opengl/screenTextFragmentShader.glsl b/chart2/opengl/screenTextFragmentShader.glsl
index 7c90ec0e3eb0..f76abee1630e 100644
--- a/chart2/opengl/screenTextFragmentShader.glsl
+++ b/chart2/opengl/screenTextFragmentShader.glsl
@@ -12,10 +12,12 @@
in vec2 vTexCoord;
uniform sampler2D TextTex;
uniform vec4 textColor;
+out vec4 actualColor;
+
void main()
{
- vec3 color = texture2D(TextTex, vTexCoord).rgb;
- gl_FragColor = vec4(textColor.rgb, 1.0 - color.r);
+ vec3 color = texture(TextTex, vTexCoord).rgb;
+ actualColor = vec4(textColor.rgb, 1.0 - color.r);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/opengl/textFragmentShader.glsl b/chart2/opengl/textFragmentShader.glsl
index 1c3af260c9a4..16be8c6ae0f0 100644
--- a/chart2/opengl/textFragmentShader.glsl
+++ b/chart2/opengl/textFragmentShader.glsl
@@ -11,10 +11,13 @@
uniform sampler2D TextTex;
in vec2 vTexCoord;
+out vec4 actualColor;
+
+
void main()
{
- vec3 color = texture2D(TextTex, vTexCoord).rgb;
- gl_FragColor = vec4(color, 1.0 - color.r);
+ vec3 color = texture(TextTex, vTexCoord).rgb;
+ actualColor = vec4(color, 1.0 - color.r);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/opengl/textFragmentShaderBatch.glsl b/chart2/opengl/textFragmentShaderBatch.glsl
index 431fa4ca73e8..c97812bd0879 100644
--- a/chart2/opengl/textFragmentShaderBatch.glsl
+++ b/chart2/opengl/textFragmentShaderBatch.glsl
@@ -17,7 +17,7 @@ in vec3 vTexCoord;
out vec4 actualColor;
void main()
{
- vec3 color = texture2DArray(texArray, vTexCoord.xyz).rgb;
+ vec3 color = texture(texArray, vTexCoord.xyz).rgb;
actualColor = vec4(color, 1.0 - color.r);
}