Initial work
This commit is contained in:
parent
f617fb542a
commit
1876b346fe
518 changed files with 15170 additions and 12486 deletions
36
Ryujinx.Graphics.Gpu/State/ViewportTransform.cs
Normal file
36
Ryujinx.Graphics.Gpu/State/ViewportTransform.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using Ryujinx.Graphics.GAL;
|
||||
|
||||
namespace Ryujinx.Graphics.Gpu.State
|
||||
{
|
||||
struct ViewportTransform
|
||||
{
|
||||
public float ScaleX;
|
||||
public float ScaleY;
|
||||
public float ScaleZ;
|
||||
public float TranslateX;
|
||||
public float TranslateY;
|
||||
public float TranslateZ;
|
||||
public uint Swizzle;
|
||||
public uint SubpixelPrecisionBias;
|
||||
|
||||
public ViewportSwizzle UnpackSwizzleX()
|
||||
{
|
||||
return (ViewportSwizzle)(Swizzle & 7);
|
||||
}
|
||||
|
||||
public ViewportSwizzle UnpackSwizzleY()
|
||||
{
|
||||
return (ViewportSwizzle)((Swizzle >> 4) & 7);
|
||||
}
|
||||
|
||||
public ViewportSwizzle UnpackSwizzleZ()
|
||||
{
|
||||
return (ViewportSwizzle)((Swizzle >> 8) & 7);
|
||||
}
|
||||
|
||||
public ViewportSwizzle UnpackSwizzleW()
|
||||
{
|
||||
return (ViewportSwizzle)((Swizzle >> 12) & 7);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue