From 7782ca89de6bd2c5ce95bd2623d2e8a943965643 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 7 Oct 2023 08:45:06 +1100 Subject: [PATCH] Update PS3 support files --- .github/workflows/build_ps3.yml | 1 + misc/ps3/Makefile | 6 +++--- misc/ps3/vs_coloured.vcg | 31 ++++++++------------------- misc/ps3/vs_offset.vcg | 15 +++++++++++++ misc/ps3/vs_textured.vcg | 37 +++++++++++---------------------- 5 files changed, 40 insertions(+), 50 deletions(-) create mode 100644 misc/ps3/vs_offset.vcg diff --git a/.github/workflows/build_ps3.yml b/.github/workflows/build_ps3.yml index 076dc3c..67ffbf2 100644 --- a/.github/workflows/build_ps3.yml +++ b/.github/workflows/build_ps3.yml @@ -17,6 +17,7 @@ jobs: id: compile run: | pacman -S make --noconfirm + export PS3DEV=/usr/local/ps3dev make ps3 - uses: ./.github/actions/notify_failure diff --git a/misc/ps3/Makefile b/misc/ps3/Makefile index 7240c94..e859df9 100644 --- a/misc/ps3/Makefile +++ b/misc/ps3/Makefile @@ -3,11 +3,11 @@ #--------------------------------------------------------------------------------- .SUFFIXES: #--------------------------------------------------------------------------------- -ifeq ($(strip $(PSL1GHT)),) -$(error "Please set PSL1GHT in your environment. export PSL1GHT=") +ifeq ($(strip $(PS3DEV)),) +$(error "Please set PS3DEV in your environment. export PS3DEV=") endif -include $(PSL1GHT)/ppu_rules +include $(PS3DEV)/ppu_rules #--------------------------------------------------------------------------------- # TARGET is the name of the output diff --git a/misc/ps3/vs_coloured.vcg b/misc/ps3/vs_coloured.vcg index d1b6366..6a02879 100644 --- a/misc/ps3/vs_coloured.vcg +++ b/misc/ps3/vs_coloured.vcg @@ -1,24 +1,11 @@ -struct vIn { - float4 color : DIFFUSE; - float4 position : POSITION; -}; - -struct vOut { - float4 col : COLOR; - float4 pos : POSITION; -}; - -vOut main( - vIn input, - uniform float4x4 mvp - ) +void main( + float4 in_position : POSITION, + float4 in_color : DIFFUSE, + uniform float4x4 mvp, + out float4 out_pos : POSITION, + out float4 out_color : COLOR) { - vOut result; - float4 position; - - position = float4(input.position.xyz, 1.0f); - - result.pos = mul(position, mvp); - result.col = input.color; - return result; + float4 pos = float4(in_position.xyz, 1.0f); + out_pos = mul(pos, mvp); + out_color = in_color; } \ No newline at end of file diff --git a/misc/ps3/vs_offset.vcg b/misc/ps3/vs_offset.vcg new file mode 100644 index 0000000..5e5c1ac --- /dev/null +++ b/misc/ps3/vs_offset.vcg @@ -0,0 +1,15 @@ +void main( + float4 in_position : POSITION, + float4 in_color : DIFFUSE, + float4 in_tex : TEXCOORD, + uniform float4x4 mvp, + uniform float4 uv_offset, + out float4 out_pos : POSITION, + out float4 out_color : COLOR, + out float2 out_tex : TEXCOORD0) +{ + float4 pos = float4(in_position.xyz, 1.0f); + out_pos = mul(pos, mvp); + out_color = in_color; + out_tex = in_tex + uv_offset; +} \ No newline at end of file diff --git a/misc/ps3/vs_textured.vcg b/misc/ps3/vs_textured.vcg index 0cee007..64c0211 100644 --- a/misc/ps3/vs_textured.vcg +++ b/misc/ps3/vs_textured.vcg @@ -1,27 +1,14 @@ -struct vIn { - float4 tex : TEXCOORD; - float4 color : DIFFUSE; - float4 position : POSITION; -}; - -struct vOut { - float4 pos : POSITION; - float4 col : COLOR; - float4 tex : TEXCOORD0; -}; - -vOut main( - vIn input, - uniform float4x4 mvp - ) +void main( + float4 in_position : POSITION, + float4 in_color : DIFFUSE, + float4 in_tex : TEXCOORD, + uniform float4x4 mvp, + out float4 out_pos : POSITION, + out float4 out_color : COLOR, + out float2 out_tex : TEXCOORD0) { - vOut result; - float4 position; - - position = float4(input.position.xyz, 1.0f); - - result.pos = mul(position, mvp); - result.col = input.color; - result.tex = input.tex; - return result; + float4 pos = float4(in_position.xyz, 1.0f); + out_pos = mul(pos, mvp); + out_color = in_color; + out_tex = in_tex; } \ No newline at end of file