Skip to content

A collection of various glsl core shader utilities/projects.

License

Notifications You must be signed in to change notification settings

McTsts/mc-core-shaders

Repository files navigation

Minecraft Core Shader Projects & Utilities

This is a collection of some shader utilities/projects, mostly for personal use, though feel free to use them for your own purposes if you want to. No guarantees that any of this is the best solution for anything. If you want to use any of the things listed on here, but are not sure how to use them / edit them for what you need, let me know on discord (@mctsts), on the crowdford server or create an issue on this repo.

Modules

A list of all utilities/shaders/things included in this repo. I started listing versions on newer ones, but they may still work in newer or older version, it's simply the most recent release I've tested it in.

Useful Shaders

You can probably use these for your own maps

Reference Shaders

These are mainly here as examples and reference, and you probably won't be able to use these yourself

Hide Sidebar Numbers

[1.19.2]

Hides the first number of scores on the sidebar without removing anything else.
Includes code/ideas from Suso and dragonmaster95.

Back

Move Hearts

[1.19.4]

A shader to move the hearts (or other gui elements), made for VALENTINX110.
A problem here is that you cant directly access the texture using the vertex UV coordinates as they might be barely in another pixel. This can be resolved by offsetting the position by half a pixel depending on the gl_VertexID.

Back

Skybox Entire Sky

Makes the entire skybox cover the entire sky, to allow rendering of custom skyboxes.
This is problematic due to the same shader also affecting text highlighting.

Back

Simplified Glowing

This is a super simple post shader file that makes glowing perform a lot better by removing the blur thing. This can severely increase fps for some computers. (Vanilla glowing is really bad for weaker computers)

Back

Remove Capes

With the migration thing capes have become a bigger problem than ever before, so here's a shader to remove them. Unfortunately, I couldn't find a good way to remove them so I check the texture. Technically it's probably possible to make a skin that fools this (since players are rendered by the same shader), but it would never happen by coincidence. The armor shader additionally removes cape elytras.

Back

Hide Armor Glint

Removes the enchanted effect from armor on entities only. Keeps the enchanted effect for things in inventory.

Back

Jetpack

This renders a jetpack on the players back. This shader is not intended to be used as is and will not work without some additional things (armor texture, datapack, etc) and is generally just for reference. The code for it is also probably awful. Enjoy.

It's a core shader that moves/resizes the elements of a leather chestplate/upper leggings part (which consist out of 4 cubes around the players torso). Using the normals of those vertices as well as a hardcoded y axis (which needs to be changed if the player is sneaking) it allows moving some of the planes of the armor around locally (apparently this is called TBN space or something). The jetpack only needs 7 planes (some planes are shared by both engines) which still leaves a few for a normal chestplate.

Back

Skin Effects

This allows players to customize their damage flash color and add blinking to their skin. This is done by setting one pixel to a specific value to enable the effects (#757591 with opacity 187), specifying a blink frame, a pixel which determines the damage flash color (may not be transparent) and a pixel that determines how often the player blinks.

image

Back

Custom Particles

This allows you to use custom particles by using the item/block particles. Item/blocks with an opacity of 254/255 will not have the random offset those particles usually have. Fill empty space with solid red (with opacity 254), this will be turned into transparency.

Back

Wavy Water

This makes water move up and down. This is adjusted for only two biomes: the void & swamp. Other biomes may not work. Adjust line 35 of the vsh (the color checks) to make it work elsewhere.

Back

Remove Name Boxes

This is a very very simple shader, that removes the boxes around names without having to rely on things like negative spaces.

Back

Move Enchanting Table GUI Book

[1.17.1 - 1.19.4]

Simple shader that allows to move the book in enchanting table gui. Define an offset in core/rendertype_entity_solid.vsh, line 35.

Example:

Back

Move Inventory Player

[1.18.2 - 1.19.4]

This is a bunch of shaders that can move the player that's displayed inside the inventory. It allows you to define an offset in include\util.glsl, line 26 that offsets the player and everything attached to it. This works with all GUI scales.

Example:

Back

Move & Recolor XP Number

[1.18.2]

This is a shader that moves and recolors the xp number with a fairly specific way of isolating it. You can remove the move or color part easily if you only want the other one.

Example:

Back

GUI Scale

[1.18.2]

A utility function that helps with dealing with GUI scales.

Back

Hardcore Hearts

[1.18.2 - 1.20]

Replaces hearts with heardcore hearts, without affecting the icons.png texture. Also does it in tab. Also works for the heart variants like wither, frozen, absorption, etc.

Back

Remove Text Shadow

[1.19]

Removes the shadow of texts. Only applies for characters with an opacity of 254, so it can be used to hide the shadows of e.g. icons. Also only affects text located at depth 0 (which is most text, such as e.g. bossbars). A list of text depths can be found here.

Back