Browse Source

for normal rendering, if we're translucent, don't use alphatesting. (as a remindernote, the shadowmathook removes MFT_IsTranslucent])

AzaezelX 5 năm trước cách đây
mục cha
commit
f956c17f3b

+ 3 - 2
Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp

@@ -2496,9 +2496,10 @@ void AlphaTestGLSL::processPix(  Vector<ShaderComponent*> &componentList,
 {
 {
    // If we're below SM3 and don't have a depth output
    // If we're below SM3 and don't have a depth output
    // feature then don't waste an instruction here.
    // feature then don't waste an instruction here.
-   if ( GFX->getPixelShaderVersion() < 3.0 &&
+   if (( GFX->getPixelShaderVersion() < 3.0 &&
         !fd.features[ MFT_EyeSpaceDepthOut ]  &&
         !fd.features[ MFT_EyeSpaceDepthOut ]  &&
-        !fd.features[ MFT_DepthOut ] )
+        !fd.features[ MFT_DepthOut ] ) ||
+         fd.features[MFT_IsTranslucent])
    {
    {
       output = NULL;
       output = NULL;
       return;
       return;

+ 3 - 2
Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp

@@ -2565,9 +2565,10 @@ void AlphaTestHLSL::processPix(  Vector<ShaderComponent*> &componentList,
 {
 {
    // If we're below SM3 and don't have a depth output
    // If we're below SM3 and don't have a depth output
    // feature then don't waste an instruction here.
    // feature then don't waste an instruction here.
-   if ( GFX->getPixelShaderVersion() < 3.0 &&
+   if (( GFX->getPixelShaderVersion() < 3.0 &&
         !fd.features[ MFT_EyeSpaceDepthOut ]  &&
         !fd.features[ MFT_EyeSpaceDepthOut ]  &&
-        !fd.features[ MFT_DepthOut ] )
+        !fd.features[ MFT_DepthOut ] ) ||
+         fd.features[MFT_IsTranslucent])
    {
    {
       output = NULL;
       output = NULL;
       return;
       return;