shithub: cstory

Download patch

ref: 530dab7bab4398f255210685046bae13c9946112
parent: 87da82a500834b9458257ed608f91fb3d392a1cb
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Sep 23 15:56:50 EDT 2020

Update Wii U shader files

--- a/src/Backends/Rendering/WiiUShaders/shader sources/glyph.psh
+++ b/src/Backends/Rendering/WiiUShaders/shader sources/glyph.psh
@@ -13,10 +13,11 @@
 
 00 TEX: ADDR(48) CNT(1) VALID_PIX 
       0  SAMPLE R0.___x, R0.xy0x, t0, s0
-01 ALU: ADDR(32) CNT(6) 
-      1  x: MUL         R0.x,  C0.x,  1.0f      
-         y: MUL         R0.y,  C0.y,  1.0f      
-         z: MUL         R0.z,  C0.z,  1.0f      
+01 ALU: ADDR(32) CNT(4) 
+      1  x: MOV         R0.x,  C0.x      
+         y: MOV         R0.y,  C0.y      
+         z: MOV         R0.z,  C0.z      
          w: MUL         R0.w,  R0.w,  C0.w      
 02 EXP_DONE: PIX0, R0
 END_OF_PROGRAM
+
--- a/src/Backends/Rendering/WiiUShaders/shader sources/plain.vert
+++ b/src/Backends/Rendering/WiiUShaders/shader sources/plain.vert
@@ -1,6 +1,7 @@
 #version 150 core
+layout(location = 0) uniform vec2 vertex_transform;
 layout(location = 0) in vec4 input_vertex_coordinates;
 void main() 
 { 
-	gl_Position = input_vertex_coordinates; 
+	gl_Position = vec4(input_vertex_coordinates.x * vertex_transform.x - 1.0f, input_vertex_coordinates.y * vertex_transform.y + 1.0f, input_vertex_coordinates.zw);
 } 
--- a/src/Backends/Rendering/WiiUShaders/shader sources/plain.vsh
+++ b/src/Backends/Rendering/WiiUShaders/shader sources/plain.vsh
@@ -1,20 +1,30 @@
 ; $MODE = "UniformRegister"
+
+; $UNIFORM_VARS[0].name = "vertex_transform"
+; $UNIFORM_VARS[0].type = "vec2"
+; $UNIFORM_VARS[0].count = 1
+; $UNIFORM_VARS[0].offset = 0
+; $UNIFORM_VARS[0].block = -1
+
 ; $ATTRIB_VARS[0].name = "input_vertex_coordinates"
 ; $ATTRIB_VARS[0].type = "vec2"
 ; $ATTRIB_VARS[0].location = 0
+
 ; $NUM_SPI_VS_OUT_ID = 1
 ; $SPI_VS_OUT_ID[0].SEMANTIC_0 = 0
 
 00 CALL_FS NO_BARRIER 
-01 EXP_DONE: POS0, R1
-02 EXP_DONE: PARAM0, R0.____
-03 ALU: ADDR(32) CNT(1) 
-      0  x: NOP         ____      
-04 NOP NO_BARRIER 
+01 ALU: ADDR(32) CNT(7) 
+      0  x: MUL         ____,  R1.y,  C0.y      
+         y: MUL         ____,  R1.x,  C0.x      
+         z: MOV         R1.z,  R1.z      
+         w: MOV         R1.w,  R1.w      
+      1  x: ADD         R1.x,  PV0.y, -1.0f      
+         y: ADD         R1.y,  PV0.x,  1.0f      
+02 EXP_DONE: POS0, R1
+03 EXP_DONE: PARAM0, R0.____
+04 ALU: ADDR(39) CNT(1) 
+      2  x: NOP         ____      
+05 NOP NO_BARRIER 
 END_OF_PROGRAM
-
-
-
-
-
 
--- a/src/Backends/Rendering/WiiUShaders/shader sources/texture.vert
+++ b/src/Backends/Rendering/WiiUShaders/shader sources/texture.vert
@@ -1,10 +1,11 @@
 #version 150 core
-layout(location = 0) uniform vec2 texture_coordinate_transform;
+layout(location = 0) uniform vec2 vertex_transform;
+layout(location = 1) uniform vec2 texture_coordinate_transform;
 layout(location = 0) in vec4 input_vertex_coordinates;
 layout(location = 1) in vec2 input_texture_coordinates;
 out vec2 texture_coordinates; 
 void main() 
 { 
-	gl_Position = input_vertex_coordinates; 
+	gl_Position = vec4(input_vertex_coordinates.x * vertex_transform.x - 1.0f, input_vertex_coordinates.y * vertex_transform.y + 1.0f, input_vertex_coordinates.zw);
 	texture_coordinates = input_texture_coordinates * texture_coordinate_transform; 
 } 
--- a/src/Backends/Rendering/WiiUShaders/shader sources/texture.vsh
+++ b/src/Backends/Rendering/WiiUShaders/shader sources/texture.vsh
@@ -1,10 +1,15 @@
 ; $MODE = "UniformRegister"
 
-; $UNIFORM_VARS[0].name = "texture_coordinate_transform"
+; $UNIFORM_VARS[0].name = "vertex_transform"
 ; $UNIFORM_VARS[0].type = "vec2"
 ; $UNIFORM_VARS[0].count = 1
-; $UNIFORM_VARS[0].offset = 0
+; $UNIFORM_VARS[0].offset = 4
 ; $UNIFORM_VARS[0].block = -1
+; $UNIFORM_VARS[1].name = "texture_coordinate_transform"
+; $UNIFORM_VARS[1].type = "vec2"
+; $UNIFORM_VARS[1].count = 1
+; $UNIFORM_VARS[1].offset = 0
+; $UNIFORM_VARS[1].block = -1
 
 ; $ATTRIB_VARS[0].name = "input_texture_coordinates"
 ; $ATTRIB_VARS[0].type = "vec2"
@@ -17,13 +22,19 @@
 ; $SPI_VS_OUT_ID[0].SEMANTIC_0 = 0
 
 00 CALL_FS NO_BARRIER 
-01 ALU: ADDR(32) CNT(2) 
-      0  x: MUL         R1.x,  R1.x,  C0.x      
-         y: MUL         R1.y,  R1.y,  C0.y      
-02 EXP_DONE: POS0, R2
-03 EXP_DONE: PARAM0, R1.xyzz  NO_BARRIER 
-04 ALU: ADDR(34) CNT(1) 
-      1  x: NOP         ____      
+01 ALU: ADDR(32) CNT(9) 
+      0  x: MUL         R0.x,  R1.x,  C0.x      
+         y: MUL         R0.y,  R1.y,  C0.y      
+         z: MUL         ____,  R2.y,  C1.y      VEC_120 
+         w: MUL         ____,  R2.x,  C1.x      VEC_120 
+         t: MOV         R1.z,  R2.z      
+      1  x: ADD         R1.x,  PV0.w, -1.0f      
+         y: ADD         R1.y,  PV0.z,  1.0f      
+         w: MOV         R1.w,  R2.w      
+02 EXP_DONE: POS0, R1
+03 EXP_DONE: PARAM0, R0.xyzz  NO_BARRIER 
+04 ALU: ADDR(41) CNT(1) 
+      2  x: NOP         ____      
 05 NOP NO_BARRIER 
 END_OF_PROGRAM