diff --git a/misc/wiiu/Makefile b/misc/wiiu/Makefile index f142b0609..10f2dc13d 100644 --- a/misc/wiiu/Makefile +++ b/misc/wiiu/Makefile @@ -80,15 +80,13 @@ export DEPSDIR := $(CURDIR)/$(BUILD) CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) \ - $(foreach dir,$(SHADERS),$(notdir $(wildcard $(dir)/*.gsh))) +BINFILES := $(foreach dir,$(SHADERS),$(notdir $(wildcard $(dir)/*.gsh))) export LD := $(CC) export OFILES_BIN := $(addsuffix .o,$(BINFILES)) export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) export OFILES := $(OFILES_BIN) $(OFILES_SRC) -export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES))) export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ @@ -153,8 +151,6 @@ $(OUTPUT).wuhb : $(OUTPUT).rpx $(OUTPUT).rpx : $(OUTPUT).elf $(OUTPUT).elf : $(OFILES) -$(OFILES_SRC) : $(HFILES_BIN) - # you need a rule like this for each extension you use as binary data #------------------------------------------------------------------------------- %.bin.o %_bin.h : %.bin diff --git a/misc/wiiu/assembler.sh b/misc/wiiu/assembler.sh index cc8d6981b..7041ca621 100755 --- a/misc/wiiu/assembler.sh +++ b/misc/wiiu/assembler.sh @@ -1,5 +1,11 @@ ASSEMBLER=/home/minty/emulators/decaf-emu-ubuntu-20.04/bin/latte-assembler -$ASSEMBLER assemble coloured.gsh --vsh coloured.vsh --psh coloured.psh -$ASSEMBLER assemble textured.gsh --vsh textured.vsh --psh textured.psh -$ASSEMBLER assemble textured_offset.gsh --vsh textured_offset.vsh +assemble() +{ + echo "Assembling $1 from VS $2 + PS $3" + $ASSEMBLER assemble $1 --vsh $2 --psh $3 +} + +assemble coloured_none.gsh vs_coloured.vsh ps_coloured_none.psh +assemble textured_none.gsh vs_textured.vsh ps_textured_none.psh +assemble textured_ofst.gsh vs_textured_offset.vsh ps_textured_none.psh diff --git a/misc/wiiu/coloured_none.gsh b/misc/wiiu/coloured_none.gsh new file mode 100644 index 000000000..6debbc494 Binary files /dev/null and b/misc/wiiu/coloured_none.gsh differ diff --git a/misc/wiiu/ps_textured_exp.psh b/misc/wiiu/ps_textured_exp.psh index d832042fe..0cb393020 100644 --- a/misc/wiiu/ps_textured_exp.psh +++ b/misc/wiiu/ps_textured_exp.psh @@ -25,7 +25,7 @@ ; -------- Disassembly -------------------- 00 TEX: ADDR(48) CNT(1) VALID_PIX 0 SAMPLE R2, R2.xy0x, t0, s0 -01 ALU: ADDR(32) CNT(14) +01 ALU: ADDR(32) CNT(4) 1 x: MUL ____, R1.y, R2.y y: MUL ____, R1.x, R2.x z: MUL ____, R1.z, R2.z diff --git a/misc/wiiu/ps_textured_lin.psh b/misc/wiiu/ps_textured_lin.psh index 58a517e45..cf1ac1a12 100644 --- a/misc/wiiu/ps_textured_lin.psh +++ b/misc/wiiu/ps_textured_lin.psh @@ -25,7 +25,7 @@ ; -------- Disassembly -------------------- 00 TEX: ADDR(48) CNT(1) VALID_PIX 0 SAMPLE R2, R2.xy0x, t0, s0 -01 ALU: ADDR(32) CNT(13) +01 ALU: ADDR(32) CNT(4) 1 x: MUL ____, R1.x, R2.x y: MUL ____, R1.z, R2.z z: MUL ____, R1.y, R2.y diff --git a/misc/wiiu/textured_none.gsh b/misc/wiiu/textured_none.gsh new file mode 100644 index 000000000..c7cfd61e8 Binary files /dev/null and b/misc/wiiu/textured_none.gsh differ diff --git a/misc/wiiu/textured_ofst.gsh b/misc/wiiu/textured_ofst.gsh new file mode 100644 index 000000000..e418bbd61 Binary files /dev/null and b/misc/wiiu/textured_ofst.gsh differ diff --git a/misc/wiiu/vs_textued.vsh b/misc/wiiu/vs_textured.vsh similarity index 100% rename from misc/wiiu/vs_textued.vsh rename to misc/wiiu/vs_textured.vsh diff --git a/src/Graphics_WiiU.c b/src/Graphics_WiiU.c index f17dfed12..28df5ac69 100644 --- a/src/Graphics_WiiU.c +++ b/src/Graphics_WiiU.c @@ -69,9 +69,9 @@ static void CompileFetchShaders(void) { /*########################################################################################################################* *---------------------------------------------------------General---------------------------------------------------------* *#########################################################################################################################*/ -extern const uint8_t coloured_gsh[]; -extern const uint8_t textured_gsh[]; -extern const uint8_t textured_offset_gsh[]; +extern const uint8_t coloured_none_gsh[]; +extern const uint8_t textured_none_gsh[]; +extern const uint8_t textured_ofst_gsh[]; static GX2VertexShader *texture_VS, *colour_VS, *offset_VS; static GX2PixelShader *texture_PS, *colour_PS; @@ -85,13 +85,13 @@ static void InitGfx(void) { CompileFetchShaders(); GX2InitSampler(&sampler, GX2_TEX_CLAMP_MODE_WRAP, GX2_TEX_XY_FILTER_MODE_POINT); - colour_VS = WHBGfxLoadGFDVertexShader(0, coloured_gsh); - colour_PS = WHBGfxLoadGFDPixelShader(0, coloured_gsh); + colour_VS = WHBGfxLoadGFDVertexShader(0, coloured_none_gsh); + colour_PS = WHBGfxLoadGFDPixelShader(0, coloured_none_gsh); - texture_VS = WHBGfxLoadGFDVertexShader(0, textured_gsh); - texture_PS = WHBGfxLoadGFDPixelShader(0, textured_gsh); + texture_VS = WHBGfxLoadGFDVertexShader(0, textured_none_gsh); + texture_PS = WHBGfxLoadGFDPixelShader(0, textured_none_gsh); - offset_VS = WHBGfxLoadGFDVertexShader(0, textured_offset_gsh); + offset_VS = WHBGfxLoadGFDVertexShader(0, textured_ofst_gsh); } void Gfx_Create(void) {