yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Pica: Implement color/alpha channel enable.

This commit is contained in:
bunnei 2015-01-27 17:26:09 -05:00
parent 9f93367aa0
commit b522cf4e6a
2 changed files with 12 additions and 1 deletions

View File

@ -370,6 +370,10 @@ struct Regs {
union { union {
BitField< 0, 1, u32> depth_test_enable; BitField< 0, 1, u32> depth_test_enable;
BitField< 4, 3, CompareFunc> depth_test_func; BitField< 4, 3, CompareFunc> depth_test_func;
BitField< 8, 1, u32> red_enable;
BitField< 9, 1, u32> green_enable;
BitField<10, 1, u32> blue_enable;
BitField<11, 1, u32> alpha_enable;
BitField<12, 1, u32> depth_write_enable; BitField<12, 1, u32> depth_write_enable;
}; };

View File

@ -594,7 +594,14 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0,
exit(0); exit(0);
} }
DrawPixel(x >> 4, y >> 4, combiner_output); const Math::Vec4<u8> result = {
registers.output_merger.red_enable ? combiner_output.r() : dest.r(),
registers.output_merger.green_enable ? combiner_output.g() : dest.g(),
registers.output_merger.blue_enable ? combiner_output.b() : dest.b(),
registers.output_merger.alpha_enable ? combiner_output.a() : dest.a()
};
DrawPixel(x >> 4, y >> 4, result);
} }
} }
} }