From c731d5770ca1fcddf13dd6a69413a451bfba2589 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 14 Mar 2025 18:30:17 +1100 Subject: [PATCH] Fixup .gsh files --- misc/wiiu/Makefile | 6 +----- misc/wiiu/assembler.sh | 12 +++++++++--- misc/wiiu/coloured_none.gsh | Bin 0 -> 1264 bytes misc/wiiu/ps_textured_exp.psh | 2 +- misc/wiiu/ps_textured_lin.psh | 2 +- misc/wiiu/textured_none.gsh | Bin 0 -> 1716 bytes misc/wiiu/textured_ofst.gsh | Bin 0 -> 1768 bytes misc/wiiu/{vs_textued.vsh => vs_textured.vsh} | 0 src/Graphics_WiiU.c | 16 ++++++++-------- 9 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 misc/wiiu/coloured_none.gsh create mode 100644 misc/wiiu/textured_none.gsh create mode 100644 misc/wiiu/textured_ofst.gsh rename misc/wiiu/{vs_textued.vsh => vs_textured.vsh} (100%) 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 0000000000000000000000000000000000000000..6debbc49466ea69beadd72b376e2786efa53fdeb GIT binary patch literal 1264 zcmds%&q~8U5XNVkwzmGOhhBvx^j6`-I5CU$so{0woxG&2wPJ$G$X z_{22JG6BDu?I7rjsmN#NXG;QUWfN@iK9P|*(_y5oxwUCpLJy}Ge)2!MdWF6XMm4o! zv33JrE%w15@Ylv%Zy&pIeRtmN+>6Z@9ioSke3G|DYzu_o?1c+s&rZHid&HPEiL;z$ z75v_Ud##M$y|`yWU+d0x$ZmWPi@a53AZ=xK&C&8d9yD~~Y0}Uz7O#@*!PToLr|`bF zk#sb0k_vhdOIk(`oTfGOAnvE@=wiCh1)J_WIJ)14qx;c<`d6tx{WtSHlqhs@AIycj xw8A&YY!6}2X;#apzmK#1YWBb5S`%wK|wCjQj^W)3JVgAv9usIVl=U}^NhidM1({oBx-Ub78Dj1_XF;y zP*YLx3$CKHu(0BMvw$I&i=mN1Cz+jj`)2l*ncZdoqPa~(3c3JgXaf2zdq;NiuFK>MAk@t&$)KXY>l3xpuN>e*#Qe8l#_4I<}R=0$R_k|&bDd8U|p;;qyB({GOymZ;+@ZF9bu xc3OEF{)a&k>1NrkScMltic_MZ+k$m|y96d$%x3-_Z;C13is_d=1EBPO%@?wVwrBtV literal 0 HcmV?d00001 diff --git a/misc/wiiu/textured_ofst.gsh b/misc/wiiu/textured_ofst.gsh new file mode 100644 index 0000000000000000000000000000000000000000..e418bbd61c3cd3655d910609c7940968805ce93c GIT binary patch literal 1768 zcmd^=ziU%b6vxlWOVdVE`#@LW5;AlU6v^liTuf2uKTzDptwKP}q8H6-OH^ySQH7fAP5A+l~5ZZ#(Lj`^3*PyI{X7%x@xXWDD6wUcaH?q^u*rPskP4$=9BR zW$cp$=VED6yXiS0HLnKEux4?uFgvW+k+mG1U-wgVIoyc!KR9?hSmMJqZx@y<4R7On zQXOvM50cek&l|x;2Hz-bREBQ^AFaSQiovJ`Z{q9bCcYl<;p;7Y_-TAzC-#5-_l{(N+u^yna zkxlL=xQn^-t+-G_Yo4IHZVT$k`xy5Z-zyc?>@*Ki*9xh_N;rz{|1bnIJy_Prr2{X9 hiqo=N`2d}X`khE=v8St_d1F$ov!Gw`3_!*Ir*Ge{#y|i7 literal 0 HcmV?d00001 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) {