Posted March 1, 201510 yr 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! Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
March 3, 201510 yr Author Anyone? It works fine if I render it in pass 0, but transparent blocks don't appear behind it. Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
March 3, 201510 yr 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); Check out my tutorials here: http://jabelarminecraft.blogspot.com/
March 3, 201510 yr Author Huh. Got it working with GL11.glDepthMask(true) after blendFunc. Thanks! Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
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.