mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-16 18:59:48 +12:00
flip y positions
This commit is contained in:
parent
56262c2c24
commit
cd12d88994
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,7 @@ vertex DisplayVertexOut vertexDisplay(uint vid [[vertex_id]]) {
|
|||
DisplayVertexOut out;
|
||||
out.uv = float2((vid << 1) & 2, vid & 2);
|
||||
out.position = float4(out.uv * 2.0f + -1.0f, 0.0f, 1.0f);
|
||||
out.position.y = -out.position.y;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -86,6 +87,8 @@ vertex DrawVertexOut vertexDraw(DrawVertexIn in [[stage_in]], constant PicaRegs&
|
|||
out.position = in.position;
|
||||
// HACK: rotate the position
|
||||
out.position.xy = -out.position.yx;
|
||||
// Flip the y position
|
||||
out.position.y = -out.position.y;
|
||||
// in.position.z is in range of [-1 ... 1], convert it to [0 ... 1]
|
||||
out.position.z = (in.position.z + 1.0) * 0.5;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue