Posted May 13, 20205 yr Hey there, I have a problem with a particle. Here is an image: https://imgur.com/a/pf2F9mh As you can clearely there are issues when the particles are overlapping. Also it does not render when a translucent pixel is in front of it. I am using a custom particle Renderer (Yes, I have tried the vanilla translucen one). Here is the renderer: public void beginRender(BufferBuilder buf, TextureManager texmanager) { RenderSystem.enableBlend(); RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); RenderSystem.alphaFunc(GL11.GL_GEQUAL, 0.003921569F); RenderSystem.disableLighting(); texmanager.bindTexture(AtlasTexture.LOCATION_PARTICLES_TEXTURE); buf.begin(7, DefaultVertexFormats.PARTICLE_POSITION_TEX_COLOR_LMAP); } //there is also some resetting stuff in finishRender() I have tried disabling the depthMask but then there is a different issue: The clouds are rendered in front of the particle (I can provide an image if necessary). Does anyone have an idea on how to fix this? Edited May 13, 20205 yr by xX_deadbush_Xx
May 13, 20205 yr Yeah, I had this problem too in PneumaticCraft, but (with much thanks to Botania, which does it right with the mana pool particles), I got it figured out: You will need a custom particle render type, like this: https://github.com/TeamPneumatic/pnc-repressurized/blob/1.15/src/main/java/me/desht/pneumaticcraft/client/particle/AirParticle.java#L91 And return that from your getParticleType() method: https://github.com/TeamPneumatic/pnc-repressurized/blob/1.15/src/main/java/me/desht/pneumaticcraft/client/particle/AirParticle.java#L71 The important thing is the alternative GL blend function (GL11.GL_SRC_ALPHA, GL11.GL_ONE), and GL_GREATER rather GL_EQUAL in the alpha func. Update: just realised you're already using GL_ONE in a custom render type. Have you also provided the finishRender() method in your render type? Edited May 13, 20205 yr by desht
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.