Skip to content

Commit

Permalink
use correct blend mode on buffered component
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Oct 2, 2024
1 parent d304f6a commit 52711f8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ private void renderBufferedTexture(final int textureId) {
RenderSystem.disableDepthTest();
RenderSystem.depthMask(false);
RenderSystem.enableBlend();
RenderSystem.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
RenderSystem.blendFuncSeparate(
GlStateManager.SourceFactor.SRC_ALPHA,
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA,
GlStateManager.SourceFactor.ONE,
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA
);
RenderSystem.setShader(GameRenderer::getPositionTexShader);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.setShaderTexture(0, textureId);
Expand All @@ -103,6 +108,5 @@ private void renderBufferedTexture(final int textureId) {
model.draw(modelViewMatrix);
RenderSystem.depthMask(true);
RenderSystem.enableDepthTest();
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
}
}

0 comments on commit 52711f8

Please sign in to comment.