Eternaldoom Posted March 1, 2015 Share Posted March 1, 2015 Hello, I'm trying to get transparent blocks to render behind a partially transparent mob. Unfortunately, as seen here, the mob is no longer rendering correctly. Here is my code: In the entity class: @Override public boolean shouldRenderInPass(int pass) { return pass == 1; } And in my model class: public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); hatBase.render(f5); rightFinger1.render(f5); GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); bottom.render(f5); middle.render(f5); head.render(f5); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); rightArm.render(f5); leftArm.render(f5); rightFinger3.render(f5); rightFinger2.render(f5); leftFinger2.render(f5); leftFinger3.render(f5); leftFinger1.render(f5); hatTop.render(f5); } Does anyone know what the problem is? Thanks! Quote Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button! Link to comment Share on other sites More sharing options...
Eternaldoom Posted March 3, 2015 Author Share Posted March 3, 2015 Anyone? It works fine if I render it in pass 0, but transparent blocks don't appear behind it. Quote Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button! Link to comment Share on other sites More sharing options...
jabelar Posted March 3, 2015 Share Posted March 3, 2015 I ran into a similar issue once. I think I solved it with some combination of the following in the Renderer: GL11.glEnable(GL11.GL_BLEND); GL11.glDepthMask(false); GL11.glEnable(GL11.GL_ALPHA_TEST); Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/ Link to comment Share on other sites More sharing options...
Eternaldoom Posted March 3, 2015 Author Share Posted March 3, 2015 Huh. Got it working with GL11.glDepthMask(true) after blendFunc. Thanks! Quote Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button! Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.