From a11e990a13b127330271c758c60de2c61dcd08a8 Mon Sep 17 00:00:00 2001 From: kitling Date: Fri, 8 May 2015 21:37:23 -0700 Subject: [PATCH] Remove in/out from shaders, replace w/ attribute/varying. I don't like this, since it looks like fragment shaders are not supposed to give any output besides built in variables, after much searching. My conclusion is that mesa is to lenient. --- src/video_core/renderer_opengl/gl_shaders.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_shaders.h b/src/video_core/renderer_opengl/gl_shaders.h index ce1f3a7c7..93a5eabf0 100644 --- a/src/video_core/renderer_opengl/gl_shaders.h +++ b/src/video_core/renderer_opengl/gl_shaders.h @@ -8,9 +8,9 @@ namespace GLShaders { const char g_vertex_shader[] = R"( #version 120 -in vec2 vert_position; -in vec2 vert_tex_coord; -varying out vec2 frag_tex_coord; +attribute vec2 vert_position; +attribute vec2 vert_tex_coord; +varying vec2 frag_tex_coord; // This is a truncated 3x3 matrix for 2D transformations: // The upper-left 2x2 submatrix performs scaling/rotation/mirroring. // The third column performs translation. @@ -28,11 +28,10 @@ void main() { const char g_fragment_shader[] = R"( #version 120 -varying in vec2 frag_tex_coord; -varying out vec4 color; +varying vec2 frag_tex_coord; uniform sampler2D color_texture; void main() { - color = texture2D(color_texture, frag_tex_coord); + gl_FragColor = texture2D(color_texture, frag_tex_coord); } )";