From f58f79c85dad7ad018a015cc6913f2789540ec22 Mon Sep 17 00:00:00 2001
From: ReinUsesLisp <reinuseslisp@airmail.cc>
Date: Wed, 26 May 2021 16:00:36 -0300
Subject: glasm: Implement Y direction

---
 src/shader_recompiler/backend/glasm/emit_glasm.cpp | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/shader_recompiler/backend/glasm/emit_glasm.cpp')

diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
index 4f838b6997..2a0524609d 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
@@ -439,6 +439,9 @@ std::string EmitGLASM(const Profile& profile, const RuntimeInfo& runtime_info, I
                   "MOV.F FSWZB[2],1;"
                   "MOV.F FSWZB[3],-1;";
     }
+    if (ctx.uses_y_direction) {
+        header += "PARAM y_direction[1]={state.material.front.ambient};";
+    }
     ctx.code.insert(0, header);
     ctx.code += "END";
     return ctx.code;
-- 
cgit v1.2.3-70-g09d2