From f956c17f3be3e0ca4fbdfc00a64cd693720550dc Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Sun, 1 Mar 2020 11:51:50 -0600 Subject: [PATCH] for normal rendering, if we're translucent, don't use alphatesting. (as a remindernote, the shadowmathook removes MFT_IsTranslucent]) --- Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp | 5 +++-- Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp index 2ed6c5061..6b9ff016f 100644 --- a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp +++ b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp @@ -2496,9 +2496,10 @@ void AlphaTestGLSL::processPix( Vector &componentList, { // If we're below SM3 and don't have a depth output // 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_DepthOut ] ) + !fd.features[ MFT_DepthOut ] ) || + fd.features[MFT_IsTranslucent]) { output = NULL; return; diff --git a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp index 6ba1f6f10..3159c0ff8 100644 --- a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp @@ -2565,9 +2565,10 @@ void AlphaTestHLSL::processPix( Vector &componentList, { // If we're below SM3 and don't have a depth output // 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_DepthOut ] ) + !fd.features[ MFT_DepthOut ] ) || + fd.features[MFT_IsTranslucent]) { output = NULL; return;