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

Back in 1.16.5 I could make my custom mobrender type render over fog. That was done with the RenderType fog. I have no clue how to do this in 1.18.2 can anyone help??

Old 1.16.5 Code

    public static RenderType getCustomEyes(ResourceLocation p_228652_0_) {
        TextureState renderstate$texturestate = new TextureState(p_228652_0_, false, false);
        return makeType("custom_eyes", DefaultVertexFormats.ENTITY, 7, 256, false, true, RenderType.State.getBuilder().texture(renderstate$texturestate).transparency(ADDITIVE_TRANSPARENCY).writeMask(COLOR_WRITE).fog(BLACK_FOG).fog(NO_FOG).build(false));
    }
}

New Code So Far.
 

    public static RenderType getCustomEyes(ResourceLocation p_228652_0_) {
        RenderStateShard.TextureStateShard renderstate$texturestate = new RenderStateShard.TextureStateShard(p_228652_0_, false, false);
        return create("eyes", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 256, false, true, RenderType.CompositeState.builder()
                .setShaderState(RENDERTYPE_EYES_SHADER).setTextureState(renderstate$texturestate)
                .setTransparencyState(ADDITIVE_TRANSPARENCY).setWriteMaskState(COLOR_WRITE)
                .createCompositeState(false));
    }

 

You'll need to disregard or take in the fog parameters within your fragment shader. You can look at `rendertype_entity_unlit_translucent.fsh` or `rendertype_eyes.fsh` for some understanding of how the uniforms are applied.

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.