mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 08:41:04 +00:00
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.
This commit is contained in:
parent
1f04567b81
commit
a11e990a13
@ -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);
|
||||
}
|
||||
)";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user