Core Shaders - ShockMicro/Minecraft-Shaders GitHub Wiki

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.

Non-rendertype Shaders

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_screen

Blit copies one buffer to another, but this shader cannot be edited with resource packs.

particle

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.

position

Determines the color of the sky.

position_color

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

position_tex

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.

position_tex_color_normal

Clouds.

position_color_tex

The fire overlay when the player is burning.

position_tex_color

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

Rendertype Shaders

These shaders tend to be more specific with their purpose. For each shader name here, assume it is prefixed with rendertype_.

Blocks

solid

All solid blocks, lava, opaque falling blocks, and leaves in fast mode.

cutout

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

cutout_mipped

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

translucent

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

tripwire

The middle section(s) of a tripwire.

crumbling

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

beacon_beam

The beam of a beacon. Seems to get rendered behind clouds.

end_portal

The strange image in the end portal.

end_gateway

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

Entities

entity_cutout_no_cull

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

entity_translucent

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

entity_solid

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.

entity_translucent_cull

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.

armor_cutout_no_cull

Armour on entities.

armor_entity_glint

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

energy_swirl

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

eyes

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

leash

Leads.

entity_shadow

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

entity_cutout_no_cull_z_offset

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

entity_cutout

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.

entity_decal

Colors the Ender Dragon while it’s dying.

item_entity_translucent_cull

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

entity_smooth_cutout

End crystal beams.

entity_no_outline

The color and pattern of banners.

entity_alpha

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

water_mask

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

outline

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

Misc

These rendertype shaders don't fit into either of the other categories, so they go here.

lines

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.

text

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

text_see_through

The nameplates of players and entities with custom names.

Unknown Shaders

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.

block

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.

new_entity

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.

position_color_lightmap

Similar to position_color, but includes a second sampler for lightmap calculations. Not observed ingame.

position_color_tex_lightmap

Similar to position_color_tex, but includes a second sampler for lightmap calculations. Not observed ingame.

position_tex_lightmap_color

Similar to position_tex_color, but includes a second sampler for lightmap calculations. Not observed ingame.

rendertype_armor_glint

Functionally the same as rendertype_armor_entity_glint. Not observed ingame, may only be used as a base.

rendertype_text_intensity

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.

rendertype_text_intensity_see_through

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.