Skip to content

Commit 2b7c7e2

Browse files
authored
Merge pull request #11 from TBoshoven/blendfunc
Set the appropriate blending function
2 parents 10ce8eb + f872ea9 commit 2b7c7e2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

MagicMirror/src/main/java/com/tomboshoven/minecraft/magicmirror/renderers/TileEntityMagicMirrorRenderer.java

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818

1919
import javax.annotation.ParametersAreNonnullByDefault;
2020

21+
import static org.lwjgl.opengl.GL11.GL_ONE_MINUS_SRC_ALPHA;
22+
import static org.lwjgl.opengl.GL11.GL_SRC_ALPHA;
23+
2124
/**
2225
* Renderer for the Magic Mirror tile entity.
2326
*/
@@ -76,6 +79,7 @@ private static void renderReflection(Reflection reflection, double x, double y,
7679
GlStateManager.pushMatrix();
7780

7881
GlStateManager.enableBlend();
82+
GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
7983

8084
// The further away the subject is, the more faint the reflection
8185
float reflectionAlpha = Math.min(1f, 1.2f - (float) (distanceSq / (MAX_DISTANCE * MAX_DISTANCE)));

0 commit comments

Comments
 (0)