diff --git a/hecl/extern/boo b/hecl/extern/boo index 66cf60ea5..af5024014 160000 --- a/hecl/extern/boo +++ b/hecl/extern/boo @@ -1 +1 @@ -Subproject commit 66cf60ea558d62353fb48c753710ff84c948b013 +Subproject commit af5024014394ad5457280060a3055dab041927a2 diff --git a/hecl/extern/libSquish b/hecl/extern/libSquish index b3bbfee51..96c520ed9 160000 --- a/hecl/extern/libSquish +++ b/hecl/extern/libSquish @@ -1 +1 @@ -Subproject commit b3bbfee51d3f01debbb6b09cbf80897c31f135c1 +Subproject commit 96c520ed950682d113953f570fbd10a485cc0e8a diff --git a/hecl/include/hecl/Backend/Backend.hpp b/hecl/include/hecl/Backend/Backend.hpp index 56f007403..63886d384 100644 --- a/hecl/include/hecl/Backend/Backend.hpp +++ b/hecl/include/hecl/Backend/Backend.hpp @@ -259,8 +259,10 @@ inline boo::AdditionalPipelineInfo ShaderTag::additionalInfo(const ExtensionSlot break; } - return {boo::BlendFactor((ext.srcFactor == BlendFactor::Original) ? blendFactors.first : ext.srcFactor), - boo::BlendFactor((ext.dstFactor == BlendFactor::Original) ? blendFactors.second : ext.dstFactor), + BlendFactor srcFactor = m_alphaTest ? BlendFactor::One : blendFactors.first; + BlendFactor dstFactor = m_alphaTest ? BlendFactor::Zero : blendFactors.second; + return {boo::BlendFactor((ext.srcFactor == BlendFactor::Original) ? srcFactor : ext.srcFactor), + boo::BlendFactor((ext.dstFactor == BlendFactor::Original) ? dstFactor : ext.dstFactor), getPrimType(), zTest, ext.noDepthWrite ? false : getDepthWrite(), diff --git a/hecl/lib/Backend/GLSL.cpp b/hecl/lib/Backend/GLSL.cpp index 6fa2687a4..f3e48e88d 100644 --- a/hecl/lib/Backend/GLSL.cpp +++ b/hecl/lib/Backend/GLSL.cpp @@ -127,7 +127,7 @@ std::string GLSL::GenerateVertUniformStruct(unsigned skinSlots, bool reflectionC } std::string GLSL::GenerateAlphaTest() const { - return " if (colorOut.a < 0.01)\n" + return " if (colorOut.a < 0.25)\n" " {\n" " discard;\n" " }\n"; diff --git a/hecl/lib/Backend/HLSL.cpp b/hecl/lib/Backend/HLSL.cpp index db41c3b1e..064a57351 100644 --- a/hecl/lib/Backend/HLSL.cpp +++ b/hecl/lib/Backend/HLSL.cpp @@ -123,7 +123,7 @@ std::string HLSL::GenerateVertUniformStruct(unsigned skinSlots, bool reflectionC } std::string HLSL::GenerateAlphaTest() const { - return " if (colorOut.a < 0.01)\n" + return " if (colorOut.a < 0.25)\n" " {\n" " discard;\n" " }\n"; diff --git a/hecl/lib/Backend/Metal.cpp b/hecl/lib/Backend/Metal.cpp index f3e2b2416..c1c20421d 100644 --- a/hecl/lib/Backend/Metal.cpp +++ b/hecl/lib/Backend/Metal.cpp @@ -123,7 +123,7 @@ std::string Metal::GenerateFragOutStruct() const { } std::string Metal::GenerateAlphaTest() const { - return " if (out.color.a < 0.01)\n" + return " if (out.color.a < 0.25)\n" " {\n" " discard_fragment();\n" " }\n";