Isolating certain elements - ShockMicro/Minecraft-Shaders GitHub Wiki
Most core shaders contain a vertexDistance
input variable that indicates the amount of blocks from the player. Some shaders also affect items in inventories or other components in GUIs. To prevent customized shaders from altering these parts, you could exclude customized code based on this distance value. The exact values seem to change based on resolution, so excluding anything with a vertexDistance
of above 800 should be good to exclude all GUI parts, without affecting in-world visuals (up to 50 chunks). The following distances were discovered for a 1080p screen:
GUI
- Advancement pop-out icons: 1450 - 1550,
- Items that are being moved between slots: 1600 - 1750,
- Items in inventory: 1750 - 1825,
- Advancement icons: 1825 - 1875,
- Items in hotbar: 1875 - 1950,
- Player doll in inventory: 1950 - 2000.
Other
- Stars in the sky: ~100. Needs more testing to find more exact values?