diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-01-17 05:55:38 -0300 |
|---|---|---|
| committer | Thog <me@thog.eu> | 2020-01-17 09:55:38 +0100 |
| commit | a5e20a8fd1de446d2948c500c95cf65b88a36687 (patch) | |
| tree | a568431ac99843ce3de4056b15d48366efb88140 | |
| parent | c5f872c70a6b10c98c5710b8ecde04fb6b8ac340 (diff) | |
Add sampler border color support on the GPU (#893)
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Image/Sampler.cs | 6 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/Sampler.cs b/Ryujinx.Graphics.Gpu/Image/Sampler.cs index 23c6160e..45f5f519 100644 --- a/Ryujinx.Graphics.Gpu/Image/Sampler.cs +++ b/Ryujinx.Graphics.Gpu/Image/Sampler.cs @@ -30,7 +30,11 @@ namespace Ryujinx.Graphics.Gpu.Image CompareMode compareMode = descriptor.UnpackCompareMode(); CompareOp compareOp = descriptor.UnpackCompareOp(); - ColorF color = new ColorF(0, 0, 0, 0); + ColorF color = new ColorF( + descriptor.BorderColorR, + descriptor.BorderColorG, + descriptor.BorderColorB, + descriptor.BorderColorA); float minLod = descriptor.UnpackMinLod(); float maxLod = descriptor.UnpackMaxLod(); diff --git a/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs b/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs index 80b1b70f..77af1ce0 100644 --- a/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs +++ b/Ryujinx.Graphics.Gpu/Image/SamplerDescriptor.cs @@ -55,10 +55,10 @@ namespace Ryujinx.Graphics.Gpu.Image public uint Word1; public uint Word2; public uint Word3; - public uint BorderColorR; - public uint BorderColorG; - public uint BorderColorB; - public uint BorderColorA; + public float BorderColorR; + public float BorderColorG; + public float BorderColorB; + public float BorderColorA; /// <summary> /// Unpacks the texture wrap mode along the X axis. |
