mirror of https://github.com/cemu-project/Cemu.git
implement point coord properly
This commit is contained in:
parent
08ea28f56e
commit
967a74024a
|
@ -4287,9 +4287,9 @@ void LatteDecompiler_emitMSLShader(LatteDecompilerShaderContext* shaderContext,
|
|||
cemu_assert_debug((psInputTable->paramGen) == 1); // handle the other bits (the same set of coordinates with different perspective/projection settings?)
|
||||
uint32 paramGenGPRIndex = psInputTable->paramGenGPR;
|
||||
if (shaderContext->typeTracker.defaultDataType == LATTE_DECOMPILER_DTYPE_FLOAT)
|
||||
src->addFmt("{} = in.position.xyxy;" _CRLF, _getRegisterVarName(shaderContext, paramGenGPRIndex));
|
||||
src->addFmt("{} = pointCoord.xyxy;" _CRLF, _getRegisterVarName(shaderContext, paramGenGPRIndex));
|
||||
else
|
||||
src->addFmt("{} = bitCast<int>(gl_PointCoord.xyxy);" _CRLF, _getRegisterVarName(shaderContext, paramGenGPRIndex));
|
||||
src->addFmt("{} = bitCast<int>(pointCoord.xyxy);" _CRLF, _getRegisterVarName(shaderContext, paramGenGPRIndex));
|
||||
}
|
||||
|
||||
for (sint32 i = 0; i < psInputTable->count; i++)
|
||||
|
|
|
@ -516,6 +516,7 @@ namespace LatteDecompiler
|
|||
}
|
||||
else
|
||||
{
|
||||
// TODO: only include these if needed?
|
||||
src->add("uint vid [[vertex_id]]");
|
||||
src->add(", uint iid [[instance_id]]");
|
||||
}
|
||||
|
@ -532,6 +533,8 @@ namespace LatteDecompiler
|
|||
break;
|
||||
case LatteConst::ShaderType::Pixel:
|
||||
src->add("FragmentIn in [[stage_in]]");
|
||||
// TODO: only include these if needed?
|
||||
src->add(", float2 pointCoord [[point_coord]]");
|
||||
src->add(", bool frontFacing [[front_facing]]");
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue