From 3622998540c12b8c1baecdc5194b59193aeee7d4 Mon Sep 17 00:00:00 2001 From: luciusDXL Date: Mon, 25 Sep 2023 18:22:27 -0700 Subject: [PATCH] Disabled alpha blending for sprites for now. --- TheForceEngine/Shaders/gpu_render_sprite.frag | 4 ++-- TheForceEngine/TFE_Jedi/Renderer/RClassic_GPU/rsectorGPU.cpp | 2 ++ TheForceEngine/gitVersion.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/TheForceEngine/Shaders/gpu_render_sprite.frag b/TheForceEngine/Shaders/gpu_render_sprite.frag index 83c2207fa..cfa711c4d 100644 --- a/TheForceEngine/Shaders/gpu_render_sprite.frag +++ b/TheForceEngine/Shaders/gpu_render_sprite.frag @@ -61,10 +61,10 @@ void main() // Sample the texture. baseColor = sampleTextureClamp(Frag_TextureId, Frag_Uv); - if (discardPixel(baseColor, LightData.w)) { discard; } + // if (discardPixel(baseColor, LightData.w)) { discard; } // Either discard very close to the iso-value or // do a two-pass filter - close cut with depth-write + alpha blend without depth-write. - // if (baseColor.a < 0.48) { discard; } + if (baseColor.a < 0.48 && LightData.w < 1.0) { discard; } // Get the emissive factor (0 = normal, 1 = 100% fullbright). #ifdef OPT_TRUE_COLOR diff --git a/TheForceEngine/TFE_Jedi/Renderer/RClassic_GPU/rsectorGPU.cpp b/TheForceEngine/TFE_Jedi/Renderer/RClassic_GPU/rsectorGPU.cpp index 2cd4bf5bc..0262543c1 100644 --- a/TheForceEngine/TFE_Jedi/Renderer/RClassic_GPU/rsectorGPU.cpp +++ b/TheForceEngine/TFE_Jedi/Renderer/RClassic_GPU/rsectorGPU.cpp @@ -1953,11 +1953,13 @@ namespace TFE_Jedi TFE_RenderState::setDepthFunction(CMP_ALWAYS); // Alpha blending... + #if 0 // Disable for now. if (s_shaderSettings.trueColor) { TFE_RenderState::setStateEnable(true, STATE_BLEND); TFE_RenderState::setBlendMode(BLEND_ONE, BLEND_ONE_MINUS_SRC_ALPHA); } + #endif s_spriteShader.bind(); s_indexBuffer.bind(); diff --git a/TheForceEngine/gitVersion.h b/TheForceEngine/gitVersion.h index 6bb1e0fdc..3338570b5 100644 --- a/TheForceEngine/gitVersion.h +++ b/TheForceEngine/gitVersion.h @@ -1,3 +1,3 @@ const char c_gitVersion[] = R"( -v1.09.510 +v1.09.512 )";