mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 17:58:37 +12:00
rsx: Fix alphakill
This commit is contained in:
parent
93b2776604
commit
cfd0b8a975
2 changed files with 2 additions and 7 deletions
|
@ -456,7 +456,7 @@ namespace glsl
|
||||||
OS << " if ((control_bits & 0x10) > 0)\n";
|
OS << " if ((control_bits & 0x10) > 0)\n";
|
||||||
OS << " {\n";
|
OS << " {\n";
|
||||||
OS << " //Alphakill\n";
|
OS << " //Alphakill\n";
|
||||||
OS << " if (!comparison_passes(rgba.a, 0., (control_bits >> 5) & 0x7))\n";
|
OS << " if (rgba.a < 0.0000000001)\n";
|
||||||
OS << " {\n";
|
OS << " {\n";
|
||||||
OS << " discard;\n";
|
OS << " discard;\n";
|
||||||
OS << " return rgba;\n";
|
OS << " return rgba;\n";
|
||||||
|
|
|
@ -1548,12 +1548,7 @@ namespace rsx
|
||||||
if (tex.alpha_kill_enabled())
|
if (tex.alpha_kill_enabled())
|
||||||
{
|
{
|
||||||
//alphakill can be ignored unless a valid comparison function is set
|
//alphakill can be ignored unless a valid comparison function is set
|
||||||
const rsx::comparison_function func = (rsx::comparison_function)tex.zfunc();
|
texture_control |= (1 << 4);
|
||||||
if (func < rsx::comparison_function::always && func >= rsx::comparison_function::never)
|
|
||||||
{
|
|
||||||
texture_control |= (1 << 4); //alphakill enable
|
|
||||||
texture_control |= ((u32)func << 5); //alphakill function
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 texaddr = rsx::get_address(tex.offset(), tex.location());
|
const u32 texaddr = rsx::get_address(tex.offset(), tex.location());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue