From e24197bb3f74888053eb4ae49e042ec46a1c7a30 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Thu, 12 Mar 2020 23:31:06 -0300 Subject: gl_shader_decompiler: Initialize gl_Position on vertex shaders --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 54b38b73a..19d6f3dcb 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -419,6 +419,10 @@ public: code.AddLine("void main() {{"); ++code.scope; + if (stage == ShaderType::Vertex) { + code.AddLine("gl_Position = vec4(0.0f, 0.0f, 0.0f, 1.0f);"); + } + if (ir.IsDecompiled()) { DecompileAST(); } else { -- cgit v1.2.3