-
Notifications
You must be signed in to change notification settings - Fork 3
Core Shaders
Core shaders are at the heart of the shader system, controlling most of the rendering in the game. If you want to do anything other than post-processing, this is where you want to look.
There are a good amount of shaders that are not prefixed with rendertype_. These have a pattern of being for more general purposes, like rendering the entire sky, all particles, or many GUI elements.
Blit copies one buffer to another, but this shader cannot be edited with resource packs.
Renders all particles. For some particles, the alpha value specified in the shader will override the particle’s inbuilt transparency e.g. in the sneeze particle. Others, like the splash particle, don't seem to allow this. More testing needed.
Determines the color of the sky.
Handles a few different things:
- The black transparent background on UI elements such as the chat field or the pause menu,
- The Mojang loading background,
- Highlighting item slots,
- The background of tooltips,
- The transparent lower hemisphere overlay on the sky approximately between times 11315 to 14150 (sunset) and 21830 to 24670 (sunrise),
- The black bars on the sides when scoped in with a spyglass.
For UI elements, Position is the screen size divided by the GUI scale. E.g. 1920x1080 with GUI scale 3 means Position for x will be [0,640] and for y [0,360].

Handles a few different things:
- The Sun and Moon,
- The worldborder,
- Most GUI textures (like the hotbar, buttons),
- Overlays (pumpkin blur, powder snow, the vignette),
- The crosshair.

Clouds.

The fire overlay when the player is burning.

Handles three things: the End sky, the main menu panorama, and menu backgrounds.

These shaders tend to be more specific with their purpose. For each shader name here, assume it is prefixed with rendertype_.
All solid blocks, lava, opaque falling blocks, and leaves in fast mode.

All non-cube-hitbox blocks. Check here for a mostly comprehensive list.

Some tinted blocks and some non-full solid blocks. Check here for a mostly comprehensive list.

Translucent blocks like water and stained glass. Check here for a mostly comprehensive list.

The middle section(s) of a tripwire.

The cracks when mining a block. Has some in-built transparency.

The beam of a beacon. Seems to get rendered behind clouds.
![]()
The strange image in the end portal.

The strange image in the end gateway. Uses the same vertex and fragment shaders as end_portal by default.

All entities, guardian beams, and shulker boxes (both placed and in inventory).

Translucent entities and parts of entities: slimes, players, markings on horses, shulker bullets, elder guardian particle effect.

Handles a few different things:
- The base (not flag) of banners,
- Shulker heads,
- Books on lecterns/enchantment tables,
- Shields,
- Beds,
- The bell part of bells,
- Capes,
- Shells of conduits,
- Paintings,
- Tridents,
- The ears on the Deadmau5 skin,
- The bottom skin layer of the first-person hand,
- The conduit item in the inventory.
With item frames, the item frame entity itself is part of the shader, however, items on it are not. Only the filled-in parts of maps placed on an item frame are part of the shader.

Flat texture items held by entities and in the inventory. Also affects translucent items in non-Fabulous mode, but does not affect normal glass or glass panes. Only applies in non-Fabulous mode. If Fabulous is on, see item_entity_translucent_cull.

Armour on entities.

The glint on enchanted armor. Has some in-built transparency.

Charged creeper (and possibly Wither, needs testing) swirling outline.

The entire body of an entity that has glowing eyes (not the eyes themselves). Has some in-built transparency.

Leads.

The blocks that are affected by an entity’s shadow, but not the shadow itself. This is locked to the block grid.

Skulls on entities and as an item. Also renders Shulker shells.

Block items in the inventory or hand/head of an entity. Does not include Shulker boxes (see entity_cutout_no_cull ), but does include chests in minecarts.

Colors the Ender Dragon while it’s dying.

Dropped items that are translucent, only used in Fabulous mode.

End crystal beams.

The color and pattern of banners.

Used in the death animation of the dragon. Seemingly only affects the dragon’s wings, possibly messed with in code?

Hides the water in a boat. Changing the color doesn't have an effect, but changing the position does.

Glowing effect on entities. This buffer only draws the already-outlined and semi-transparent glowing, not covering the entire entity like pre-1.17.

These rendertype shaders don't fit into either of the other categories, so they go here.
Handles a few different things:
- The outline when hovering over a block,
- The debug crosshair,
- The f3+B hitbox displays,
- The f3+G chunk border displays,
- Previews in the structure block.

All parts of text, including the shadow. Handles all text.

The nameplates of players and entities with custom names.

These are shaders that exist in the files that we do not currently know the purpose of. More testing is needed for these. If you would like to help test these, try setting the FragColor or VertexColor to vec4(1.0, 0.0, 0.0, 1.0) in case you're able to find their use.
Has 2 ins (UV0 and UV2) and 2 outs (texCoord0 and texCoord2), no math other than what’s included in most other shaders. Not observed ingame, may only be used as a base.
Has 3 ins (UV0, UV1, and UV2) and 3 outs (texCoord0, texCoord1, and texCoord2), no math other than what’s included in most other shaders. Not observed ingame, may only be used as a base.
Similar to position_color, but includes a second sampler for lightmap calculations. Not observed ingame.
Similar to position_color_tex, but includes a second sampler for lightmap calculations. Not observed ingame.
Similar to position_tex_color, but includes a second sampler for lightmap calculations. Not observed ingame.
Functionally the same as rendertype_armor_entity_glint. Not observed ingame, may only be used as a base.
Functionally the same as rendertype_text, except it uses the red value for every color in the texture calculation. Not observed ingame, may only be used for internal calculations.
Functionally the same as rendertype_text_see_through, except it uses the red value for every color in the texture calculation. Not observed ingame, may only be used for internal calculations.