Skip to content

Commit 3622998

Browse files
committed
Disabled alpha blending for sprites for now.
1 parent 8820787 commit 3622998

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

TheForceEngine/Shaders/gpu_render_sprite.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ void main()
6161

6262
// Sample the texture.
6363
baseColor = sampleTextureClamp(Frag_TextureId, Frag_Uv);
64-
if (discardPixel(baseColor, LightData.w)) { discard; }
64+
// if (discardPixel(baseColor, LightData.w)) { discard; }
6565
// Either discard very close to the iso-value or
6666
// do a two-pass filter - close cut with depth-write + alpha blend without depth-write.
67-
// if (baseColor.a < 0.48) { discard; }
67+
if (baseColor.a < 0.48 && LightData.w < 1.0) { discard; }
6868

6969
// Get the emissive factor (0 = normal, 1 = 100% fullbright).
7070
#ifdef OPT_TRUE_COLOR

TheForceEngine/TFE_Jedi/Renderer/RClassic_GPU/rsectorGPU.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,11 +1953,13 @@ namespace TFE_Jedi
19531953
TFE_RenderState::setDepthFunction(CMP_ALWAYS);
19541954

19551955
// Alpha blending...
1956+
#if 0 // Disable for now.
19561957
if (s_shaderSettings.trueColor)
19571958
{
19581959
TFE_RenderState::setStateEnable(true, STATE_BLEND);
19591960
TFE_RenderState::setBlendMode(BLEND_ONE, BLEND_ONE_MINUS_SRC_ALPHA);
19601961
}
1962+
#endif
19611963

19621964
s_spriteShader.bind();
19631965
s_indexBuffer.bind();

TheForceEngine/gitVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
const char c_gitVersion[] = R"(
2-
v1.09.510
2+
v1.09.512
33
)";

0 commit comments

Comments
 (0)