mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-21 02:01:14 +02:00
macOS: Fix NaN texture coordinates resolving toward max on Apple GPUs
- Fixes Animal Crossing: New Horizons backdrops being white instead of black Patched applied from: https://github.com/Ryubing/Issues/issues/476
This commit is contained in:
committed by
KeatonTheBot
parent
9c46452388
commit
087e711e44
@@ -1241,6 +1241,23 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||
|
||||
SpvInstruction pCoords = AssemblePVector(pCount);
|
||||
|
||||
if (!intCoords)
|
||||
{
|
||||
SpvInstruction nfFp32 = context.TypeFP32();
|
||||
SpvInstruction nfType = pCount > 1 ? context.TypeVector(nfFp32, pCount) : nfFp32;
|
||||
SpvInstruction nfZero = context.Constant(nfFp32, 0f);
|
||||
|
||||
if (pCount > 1)
|
||||
{
|
||||
SpvInstruction[] nfElems = new SpvInstruction[pCount];
|
||||
for (int nfI = 0; nfI < pCount; nfI++) { nfElems[nfI] = nfZero; }
|
||||
nfZero = context.ConstantComposite(nfType, nfElems);
|
||||
}
|
||||
|
||||
SpvInstruction nfBool = pCount > 1 ? context.TypeVector(context.TypeBool(), pCount) : context.TypeBool();
|
||||
pCoords = context.Select(nfType, context.IsNan(nfBool, pCoords), nfZero, pCoords);
|
||||
}
|
||||
|
||||
SpvInstruction AssembleDerivativesVector(int count)
|
||||
{
|
||||
if (count > 1)
|
||||
|
||||
Reference in New Issue
Block a user