diff --git a/misc/wiiu/coloured.gsh b/misc/wiiu/coloured.gsh deleted file mode 100644 index 6debbc494..000000000 Binary files a/misc/wiiu/coloured.gsh and /dev/null differ diff --git a/misc/wiiu/coloured.psh.glsl b/misc/wiiu/ps_coloured_none.glsl similarity index 100% rename from misc/wiiu/coloured.psh.glsl rename to misc/wiiu/ps_coloured_none.glsl diff --git a/misc/wiiu/coloured.psh b/misc/wiiu/ps_coloured_none.psh similarity index 100% rename from misc/wiiu/coloured.psh rename to misc/wiiu/ps_coloured_none.psh diff --git a/misc/wiiu/ps_textured_exp.glsl b/misc/wiiu/ps_textured_exp.glsl new file mode 100644 index 000000000..05d31dcb9 --- /dev/null +++ b/misc/wiiu/ps_textured_exp.glsl @@ -0,0 +1,13 @@ +varying vec4 out_col; +varying vec2 out_uv; +uniform sampler2D texImage; +uniform vec3 fogCol; +uniform float fogDensity; + +void main() { + vec4 col = texture(texImage, out_uv) * out_col; + float depth = 1.0 / gl_FragCoord.w; + float f = clamp(exp2(fogDensity * depth), 0.0, 1.0); + col.rgb = mix(fogCol, col.rgb, f); + gl_FragColor = col; +} diff --git a/misc/wiiu/ps_textured_exp.psh b/misc/wiiu/ps_textured_exp.psh new file mode 100644 index 000000000..d832042fe --- /dev/null +++ b/misc/wiiu/ps_textured_exp.psh @@ -0,0 +1,44 @@ +; $MODE = "UniformRegister" +; $SAMPLER_VARS[0].name= "texImage" +; $SAMPLER_VARS[0].type= "sampler2D" +; $SAMPLER_VARS[0].location = 0 + +; $NUM_SPI_PS_INPUT_CNTL = 2 +; $SPI_PS_INPUT_CNTL[0].semantic = 0 +; $SPI_PS_INPUT_CNTL[0].default_val = 1 +; $SPI_PS_INPUT_CNTL[1].semantic = 1 +; $SPI_PS_INPUT_CNTL[1].default_val = 1 + +; C0 +; $UNIFORM_VARS[0].name = "fogColor" +; $UNIFORM_VARS[0].type = "vec4" +; $UNIFORM_VARS[0].count = 1 +; $UNIFORM_VARS[0].block = -1 +; $UNIFORM_VARS[0].offset = 0 +; C1 +; $UNIFORM_VARS[1].name = "fogEnd" +; $UNIFORM_VARS[1].type = "vec2" +; $UNIFORM_VARS[1].count = 1 +; $UNIFORM_VARS[1].block = -1 +; $UNIFORM_VARS[1].offset = 4 + +; -------- Disassembly -------------------- +00 TEX: ADDR(48) CNT(1) VALID_PIX + 0 SAMPLE R2, R2.xy0x, t0, s0 +01 ALU: ADDR(32) CNT(14) + 1 x: MUL ____, R1.y, R2.y + y: MUL ____, R1.x, R2.x + z: MUL ____, R1.z, R2.z + w: MUL R2.w, R1.w, R2.w + t: RCP_sat ____, R0.w + 2 x: ADD R1.x, PV1.x, -C0.y + y: ADD R1.y, PV1.y, -C0.x + w: ADD R0.w, PV1.z, -C0.z + t: RCP_e ____, PS1 + 3 w: MUL ____, PS2, C1.x + 4 t: EXP_e ____, PV3.w CLAMP + 5 x: MULADD R2.x, R1.y, PS4, C0.x + y: MULADD R2.y, R1.x, PS4, C0.y + z: MULADD R2.z, R0.w, PS4, C0.z +02 EXP_DONE: PIX0, R2 +END_OF_PROGRAM diff --git a/misc/wiiu/ps_textured_lin.glsl b/misc/wiiu/ps_textured_lin.glsl new file mode 100644 index 000000000..c51f6ae51 --- /dev/null +++ b/misc/wiiu/ps_textured_lin.glsl @@ -0,0 +1,14 @@ +varying vec4 out_col; +varying vec2 out_uv; + +uniform sampler2D texImage; +uniform vec3 fogCol; +uniform float fogEnd; + +void main() { + vec4 col = texture(texImage, out_uv) * out_col; + float depth = 1.0 / gl_FragCoord.w; + float f = clamp(1.0 - fogEnd * depth, 0.0, 1.0); + col.rgb = mix(fogCol, col.rgb, f); + gl_FragColor = col; +} diff --git a/misc/wiiu/ps_textured_lin.psh b/misc/wiiu/ps_textured_lin.psh new file mode 100644 index 000000000..58a517e45 --- /dev/null +++ b/misc/wiiu/ps_textured_lin.psh @@ -0,0 +1,44 @@ +; $MODE = "UniformRegister" +; $SAMPLER_VARS[0].name= "texImage" +; $SAMPLER_VARS[0].type= "sampler2D" +; $SAMPLER_VARS[0].location = 0 + +; $NUM_SPI_PS_INPUT_CNTL = 2 +; $SPI_PS_INPUT_CNTL[0].semantic = 0 +; $SPI_PS_INPUT_CNTL[0].default_val = 1 +; $SPI_PS_INPUT_CNTL[1].semantic = 1 +; $SPI_PS_INPUT_CNTL[1].default_val = 1 + +; C0 +; $UNIFORM_VARS[0].name = "fogColor" +; $UNIFORM_VARS[0].type = "vec4" +; $UNIFORM_VARS[0].count = 1 +; $UNIFORM_VARS[0].block = -1 +; $UNIFORM_VARS[0].offset = 0 +; C1 +; $UNIFORM_VARS[1].name = "fogEnd" +; $UNIFORM_VARS[1].type = "vec2" +; $UNIFORM_VARS[1].count = 1 +; $UNIFORM_VARS[1].block = -1 +; $UNIFORM_VARS[1].offset = 4 + +; -------- Disassembly -------------------- +00 TEX: ADDR(48) CNT(1) VALID_PIX + 0 SAMPLE R2, R2.xy0x, t0, s0 +01 ALU: ADDR(32) CNT(13) + 1 x: MUL ____, R1.x, R2.x + y: MUL ____, R1.z, R2.z + z: MUL ____, R1.y, R2.y + w: MUL R2.w, R1.w, R2.w + t: RCP_sat ____, R0.w + 2 x: ADD R1.x, PV1.z, -C0.y + y: ADD R1.y, PV1.x, -C0.x + w: ADD R0.w, PV1.y, -C0.z + t: RCP_e ____, PS1 + 3 z: MULADD R127.z, -PS2, C1.x, 1.0f CLAMP + 4 x: MULADD R2.x, R1.y, PV3.z, C0.x + y: MULADD R2.y, R1.x, PV3.z, C0.y + z: MULADD R2.z, R0.w, PV3.z, C0.z +02 EXP_DONE: PIX0, R2 +END_OF_PROGRAM + diff --git a/misc/wiiu/textured.psh.glsl b/misc/wiiu/ps_textured_none.glsl similarity index 100% rename from misc/wiiu/textured.psh.glsl rename to misc/wiiu/ps_textured_none.glsl diff --git a/misc/wiiu/textured.psh b/misc/wiiu/ps_textured_none.psh similarity index 100% rename from misc/wiiu/textured.psh rename to misc/wiiu/ps_textured_none.psh diff --git a/misc/wiiu/textured.gsh b/misc/wiiu/textured.gsh deleted file mode 100644 index c7cfd61e8..000000000 Binary files a/misc/wiiu/textured.gsh and /dev/null differ diff --git a/misc/wiiu/textured_offset.gsh b/misc/wiiu/textured_offset.gsh deleted file mode 100644 index 72b9ddcde..000000000 Binary files a/misc/wiiu/textured_offset.gsh and /dev/null differ diff --git a/misc/wiiu/coloured.vsh.glsl b/misc/wiiu/vs_coloured.glsl similarity index 100% rename from misc/wiiu/coloured.vsh.glsl rename to misc/wiiu/vs_coloured.glsl diff --git a/misc/wiiu/coloured.vsh b/misc/wiiu/vs_coloured.vsh similarity index 100% rename from misc/wiiu/coloured.vsh rename to misc/wiiu/vs_coloured.vsh diff --git a/misc/wiiu/textured.vsh b/misc/wiiu/vs_textued.vsh similarity index 100% rename from misc/wiiu/textured.vsh rename to misc/wiiu/vs_textued.vsh diff --git a/misc/wiiu/textured.vsh.glsl b/misc/wiiu/vs_textured.glsl similarity index 100% rename from misc/wiiu/textured.vsh.glsl rename to misc/wiiu/vs_textured.glsl diff --git a/misc/wiiu/textured_offset.vsh.glsl b/misc/wiiu/vs_textured_offset.glsl similarity index 100% rename from misc/wiiu/textured_offset.vsh.glsl rename to misc/wiiu/vs_textured_offset.glsl diff --git a/misc/wiiu/textured_offset.vsh b/misc/wiiu/vs_textured_offset.vsh similarity index 100% rename from misc/wiiu/textured_offset.vsh rename to misc/wiiu/vs_textured_offset.vsh