diff options
author | bunnei <bunneidev@gmail.com> | 2018-04-18 22:42:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-18 22:42:40 +0200 |
commit | ce4f159b1cf2aa090e41dc0e2fbd65aa6a31942e (patch) | |
tree | f8f53423389ca5787c05e249d65cd2df3f59b037 /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | Merge pull request #350 from Subv/tex_components (diff) | |
download | yuzu-ce4f159b1cf2aa090e41dc0e2fbd65aa6a31942e.tar yuzu-ce4f159b1cf2aa090e41dc0e2fbd65aa6a31942e.tar.gz yuzu-ce4f159b1cf2aa090e41dc0e2fbd65aa6a31942e.tar.bz2 yuzu-ce4f159b1cf2aa090e41dc0e2fbd65aa6a31942e.tar.lz yuzu-ce4f159b1cf2aa090e41dc0e2fbd65aa6a31942e.tar.xz yuzu-ce4f159b1cf2aa090e41dc0e2fbd65aa6a31942e.tar.zst yuzu-ce4f159b1cf2aa090e41dc0e2fbd65aa6a31942e.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_gen.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 8b7f17601..254f6e2c3 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -29,9 +29,15 @@ out gl_PerVertex { out vec4 position; +layout (std140) uniform vs_config { + vec4 viewport_flip; +}; + void main() { exec_shader(); + // Viewport can be flipped, which is unsupported by glViewport + position.xy *= viewport_flip.xy; gl_Position = position; } )"; @@ -52,6 +58,10 @@ ProgramResult GenerateFragmentShader(const ShaderSetup& setup, const MaxwellFSCo in vec4 position; out vec4 color; +layout (std140) uniform fs_config { + vec4 viewport_flip; +}; + uniform sampler2D tex[32]; void main() { |