mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
Detect passthrough TEV stages
This commit is contained in:
parent
ef2467bc60
commit
c13c8046d4
1 changed files with 12 additions and 0 deletions
|
@ -447,5 +447,17 @@ namespace PICA {
|
||||||
|
|
||||||
u32 getColorScale() { return (colorScale <= 2) ? (1 << colorScale) : 1; }
|
u32 getColorScale() { return (colorScale <= 2) ? (1 << colorScale) : 1; }
|
||||||
u32 getAlphaScale() { return (alphaScale <= 2) ? (1 << alphaScale) : 1; }
|
u32 getAlphaScale() { return (alphaScale <= 2) ? (1 << alphaScale) : 1; }
|
||||||
|
|
||||||
|
bool isPassthroughStage() {
|
||||||
|
// clang-format off
|
||||||
|
// Thank you to the Citra dev that wrote this out
|
||||||
|
return (
|
||||||
|
colorOp == Operation::Replace && alphaOp == Operation::Replace &&
|
||||||
|
colorSource1 == Source::Previous && alphaSource1 == Source::Previous &&
|
||||||
|
colorOperand1 == ColorOperand::SourceColor && alphaOperand1 == AlphaOperand::SourceAlpha &&
|
||||||
|
getColorScale() == 1 && getAlphaScale() == 1
|
||||||
|
);
|
||||||
|
// clang-format on
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} // namespace PICA
|
} // namespace PICA
|
||||||
|
|
Loading…
Add table
Reference in a new issue