Skip to content

Commit

Permalink
Update PS3 support files
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Oct 6, 2023
1 parent 756f930 commit 7782ca8
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 50 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_ps3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
id: compile
run: |
pacman -S make --noconfirm
export PS3DEV=/usr/local/ps3dev
make ps3
- uses: ./.github/actions/notify_failure
Expand Down
6 changes: 3 additions & 3 deletions misc/ps3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(PSL1GHT)),)
$(error "Please set PSL1GHT in your environment. export PSL1GHT=<path>")
ifeq ($(strip $(PS3DEV)),)
$(error "Please set PS3DEV in your environment. export PS3DEV=<path>")
endif

include $(PSL1GHT)/ppu_rules
include $(PS3DEV)/ppu_rules

#---------------------------------------------------------------------------------
# TARGET is the name of the output
Expand Down
31 changes: 9 additions & 22 deletions misc/ps3/vs_coloured.vcg
Original file line number Diff line number Diff line change
@@ -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;
}
15 changes: 15 additions & 0 deletions misc/ps3/vs_offset.vcg
Original file line number Diff line number Diff line change
@@ -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;
}
37 changes: 12 additions & 25 deletions misc/ps3/vs_textured.vcg
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 7782ca8

Please sign in to comment.