Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 by xX_deadbush_Xx

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 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.