mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-07 15:52:59 +12:00
Shadergen: Add clipping
This commit is contained in:
parent
c02b382262
commit
441aa2346c
3 changed files with 32 additions and 10 deletions
|
@ -845,6 +845,13 @@ OpenGL::Program& RendererGL::getSpecializedShader() {
|
|||
uniforms.depthScale = f24::fromRaw(regs[PICA::InternalRegs::DepthScale] & 0xffffff).toFloat32();
|
||||
uniforms.depthOffset = f24::fromRaw(regs[PICA::InternalRegs::DepthOffset] & 0xffffff).toFloat32();
|
||||
|
||||
if (regs[InternalRegs::ClipEnable] & 1) {
|
||||
uniforms.clipCoords[0] = f24::fromRaw(regs[PICA::InternalRegs::ClipData0] & 0xffffff).toFloat32();
|
||||
uniforms.clipCoords[1] = f24::fromRaw(regs[PICA::InternalRegs::ClipData1] & 0xffffff).toFloat32();
|
||||
uniforms.clipCoords[2] = f24::fromRaw(regs[PICA::InternalRegs::ClipData2] & 0xffffff).toFloat32();
|
||||
uniforms.clipCoords[3] = f24::fromRaw(regs[PICA::InternalRegs::ClipData3] & 0xffffff).toFloat32();
|
||||
}
|
||||
|
||||
// Set up the constant color for the 6 TEV stages
|
||||
for (int i = 0; i < 6; i++) {
|
||||
static constexpr std::array<u32, 6> ioBases = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue