mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 23:11:18 +12:00
specialize fragment shader output types & fix: shader errors
This commit is contained in:
parent
d7e9aff230
commit
e2ec602c43
11 changed files with 205 additions and 121 deletions
|
@ -222,6 +222,8 @@ namespace LatteDecompiler
|
|||
{
|
||||
auto* src = shaderContext->shaderSource;
|
||||
|
||||
src->add("#define GET_FRAGCOORD() vec4(in.position.xy * supportBuffer.fragCoordScale.xy, in.position.z, 1.0 / in.position.w)" _CRLF);
|
||||
|
||||
src->add("struct FragmentIn {" _CRLF);
|
||||
|
||||
LatteShaderPSInputTable* psInputTable = LatteSHRC_GetPSInputTable();
|
||||
|
@ -263,7 +265,9 @@ namespace LatteDecompiler
|
|||
{
|
||||
if ((decompilerContext->shader->pixelColorOutputMask & (1 << i)) != 0)
|
||||
{
|
||||
src->addFmt("float4 passPixelColor{} [[color({})]];" _CRLF, i, i);
|
||||
src->addFmt("#ifdef {}" _CRLF, GetColorAttachmentTypeStr(i));
|
||||
src->addFmt("{} passPixelColor{} [[color({})]];" _CRLF, GetColorAttachmentTypeStr(i), i, i);
|
||||
src->add("#endif" _CRLF);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue