├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── assets └── minecraft │ └── shaders │ ├── core │ ├── particle.json │ ├── position_color.fsh │ ├── position_color.json │ ├── position_color.vsh │ ├── position_tex.json │ ├── position_tex_color.fsh │ ├── position_tex_color.json │ ├── position_tex_color.vsh │ ├── render │ │ ├── armor.fsh │ │ ├── armor.vsh │ │ ├── beacon_beam.fsh │ │ ├── beacon_beam.vsh │ │ ├── clouds.fsh │ │ ├── clouds.vsh │ │ ├── crumbling.fsh │ │ ├── crumbling.vsh │ │ ├── end_crystal_beam.fsh │ │ ├── end_crystal_beam.vsh │ │ ├── end_portal.fsh │ │ ├── end_portal.vsh │ │ ├── energy_swirl.fsh │ │ ├── energy_swirl.vsh │ │ ├── eyes.fsh │ │ ├── eyes.vsh │ │ ├── glint.fsh │ │ ├── glint_armor.vsh │ │ ├── glint_item.vsh │ │ ├── gui_overlay.fsh │ │ ├── gui_overlay.vsh │ │ ├── gui_texture.fsh │ │ ├── gui_texture.vsh │ │ ├── leash.fsh │ │ ├── leash.vsh │ │ ├── lightning.fsh │ │ ├── lightning.vsh │ │ ├── lines.fsh │ │ ├── lines.vsh │ │ ├── outline.fsh │ │ ├── outline.vsh │ │ ├── particle.fsh │ │ ├── particle.vsh │ │ ├── shadow.fsh │ │ ├── shadow.vsh │ │ ├── text.fsh │ │ ├── text.vsh │ │ ├── warden_emissive.fsh │ │ └── warden_emissive.vsh │ ├── rendertype_armor_cutout_no_cull.json │ ├── rendertype_armor_entity_glint.json │ ├── rendertype_armor_glint.json │ ├── rendertype_beacon_beam.json │ ├── rendertype_clouds.json │ ├── rendertype_crumbling.json │ ├── rendertype_cutout.json │ ├── rendertype_cutout_mipped.json │ ├── rendertype_end_gateway.json │ ├── rendertype_end_portal.json │ ├── rendertype_energy_swirl.json │ ├── rendertype_entity_cutout.json │ ├── rendertype_entity_cutout_no_cull.json │ ├── rendertype_entity_cutout_no_cull_z_offset.json │ ├── rendertype_entity_glint.json │ ├── rendertype_entity_glint_direct.json │ ├── rendertype_entity_no_outline.json │ ├── rendertype_entity_shadow.json │ ├── rendertype_entity_smooth_cutout.json │ ├── rendertype_entity_solid.json │ ├── rendertype_entity_translucent.json │ ├── rendertype_entity_translucent_cull.json │ ├── rendertype_entity_translucent_emissive.json │ ├── rendertype_eyes.json │ ├── rendertype_glint_direct.json │ ├── rendertype_glint_translucent.json │ ├── rendertype_gui.json │ ├── rendertype_gui_ghost_recipe_overlay.json │ ├── rendertype_gui_overlay.json │ ├── rendertype_gui_text_highlight.json │ ├── rendertype_item_entity_translucent_cull.json │ ├── rendertype_leash.json │ ├── rendertype_lightning.json │ ├── rendertype_lines.json │ ├── rendertype_outline.json │ ├── rendertype_solid.json │ ├── rendertype_text.json │ ├── rendertype_translucent.json │ ├── rendertype_tripwire.json │ └── shared │ │ ├── block_cutout.fsh │ │ ├── block_cutout.vsh │ │ ├── block_cutout_mipped.fsh │ │ ├── block_cutout_mipped.vsh │ │ ├── block_solid.fsh │ │ ├── block_solid.vsh │ │ ├── block_translucent.fsh │ │ ├── block_translucent.vsh │ │ ├── block_tripwire.fsh │ │ ├── block_tripwire.vsh │ │ ├── entity_cutout.fsh │ │ ├── entity_cutout.vsh │ │ ├── entity_cutout_no_cull.fsh │ │ ├── entity_cutout_no_cull.vsh │ │ ├── entity_cutout_no_cull_z_offset.fsh │ │ ├── entity_cutout_no_cull_z_offset.vsh │ │ ├── entity_item_translucent_cull.fsh │ │ ├── entity_item_translucent_cull.vsh │ │ ├── entity_no_outline.fsh │ │ ├── entity_no_outline.vsh │ │ ├── entity_solid.fsh │ │ ├── entity_solid.vsh │ │ ├── entity_translucent.fsh │ │ ├── entity_translucent.vsh │ │ ├── entity_translucent_cull.fsh │ │ └── entity_translucent_cull.vsh │ └── include │ ├── config.glsl │ ├── fog.glsl │ ├── light.glsl │ ├── matrix.glsl │ ├── projection.glsl │ └── render │ ├── block.fsh │ ├── block.vsh │ ├── entity.fsh │ └── entity.vsh └── pack.mcmeta /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.zip -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Godlander 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Custom core shader template 2 | 3 | some of the vanilla core shaders are unintuitively named and needlessly repetitive, so i grouped many of the similar ones together and renamed them to more intuitively describe what they do 4 | 5 | not all shaders are included, for example ones unobserved ingame such as `new_entity` or ones too niche to be useful, like `water_mask` 6 | 7 | if there are any visual differences from vanilla lemme know 8 | 9 | ### Changes from vanilla 10 | 11 | - grouped all block / entity renderers in `core/shared`, tagged with `#define` s, and consolidated block and entity shader in `include/render` 12 | - renamed many other unique renderers appropriately in `core/render` 13 | - changed all cases of `texelFetch(Sampler2, UV2 / 16., 0)` to `minecraft_sample_lightmap(Sampler2, UV2)`, this makes all lighting use the same function so changing lighting will be consistent. 14 | 15 | for a comprehensive list of what each rendertype affects, see [the community maintained shader wiki](https://github.com/McTsts/Minecraft-Shaders-Wiki/blob/main/Core%20Shader%20List.md) 16 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/particle.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/particle", 8 | "fragment": "render/particle", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 20 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/position_color.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 vertexColor; 4 | 5 | uniform vec4 ColorModulator; 6 | 7 | out vec4 fragColor; 8 | 9 | void main() { 10 | vec4 color = vertexColor; 11 | if (color.a == 0.0) discard; 12 | fragColor = color * ColorModulator; 13 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/position_color.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "position_color", 8 | "fragment": "position_color", 9 | "samplers": [ 10 | ], 11 | "uniforms": [ 12 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 13 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/position_color.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec3 Position; 4 | in vec4 Color; 5 | 6 | uniform mat4 ModelViewMat; 7 | uniform mat4 ProjMat; 8 | 9 | out vec4 vertexColor; 10 | 11 | void main() { 12 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 13 | vertexColor = Color; 14 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/position_tex.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/gui_texture", 8 | "fragment": "render/gui_texture", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/position_tex_color.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | uniform sampler2D Sampler0; 4 | 5 | uniform vec4 ColorModulator; 6 | 7 | in vec2 texCoord0; 8 | in vec4 vertexColor; 9 | 10 | out vec4 fragColor; 11 | 12 | void main() { 13 | vec4 color = texture(Sampler0, texCoord0) * vertexColor; 14 | if (color.a < 0.1) discard; 15 | fragColor = color * ColorModulator; 16 | } 17 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/position_tex_color.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "position_tex_color", 8 | "fragment": "position_tex_color", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/position_tex_color.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec3 Position; 4 | in vec2 UV0; 5 | in vec4 Color; 6 | 7 | uniform mat4 ModelViewMat; 8 | uniform mat4 ProjMat; 9 | 10 | out vec2 texCoord0; 11 | out vec4 vertexColor; 12 | 13 | void main() { 14 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 15 | texCoord0 = UV0; 16 | vertexColor = Color; 17 | } 18 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/armor.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | uniform vec4 FogColor; 11 | 12 | in float vertexDistance; 13 | in vec4 vertexColor; 14 | in vec4 lightColor; 15 | in vec2 texCoord0; 16 | in vec4 normal; 17 | 18 | out vec4 fragColor; 19 | 20 | void main() { 21 | vec4 color = texture(Sampler0, texCoord0); 22 | if (color.a < 0.1) discard; 23 | color *= vertexColor * ColorModulator * lightColor; 24 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 25 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/armor.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | #moj_import 5 | 6 | in vec3 Position; 7 | in vec4 Color; 8 | in vec2 UV0; 9 | in ivec2 UV2; 10 | in vec3 Normal; 11 | 12 | uniform sampler2D Sampler1; 13 | uniform sampler2D Sampler2; 14 | 15 | uniform mat4 ModelViewMat; 16 | uniform mat4 ProjMat; 17 | uniform int FogShape; 18 | 19 | uniform vec3 Light0_Direction; 20 | uniform vec3 Light1_Direction; 21 | 22 | out float vertexDistance; 23 | out vec4 vertexColor; 24 | out vec4 lightColor; 25 | out vec2 texCoord0; 26 | out vec4 normal; 27 | 28 | void main() { 29 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 30 | 31 | vertexDistance = fog_distance(Position, FogShape); 32 | vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); 33 | lightColor = minecraft_sample_lightmap(Sampler2, UV2); 34 | texCoord0 = UV0; 35 | normal = ProjMat * ModelViewMat * vec4(Normal, 0.0); 36 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/beacon_beam.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform mat4 ProjMat; 8 | uniform vec4 ColorModulator; 9 | uniform float FogStart; 10 | uniform float FogEnd; 11 | uniform vec4 FogColor; 12 | 13 | in vec4 vertexColor; 14 | in vec2 texCoord0; 15 | 16 | out vec4 fragColor; 17 | 18 | void main() { 19 | vec4 color = texture(Sampler0, texCoord0); 20 | color *= vertexColor * ColorModulator; 21 | float fragmentDistance = -ProjMat[3].z / ((gl_FragCoord.z) * -2.0 + 1.0 - ProjMat[2].z); 22 | fragColor = linear_fog(color, fragmentDistance, FogStart, FogEnd, FogColor); 23 | } 24 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/beacon_beam.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec3 Position; 4 | in vec4 Color; 5 | in vec2 UV0; 6 | 7 | uniform mat4 ModelViewMat; 8 | uniform mat4 ProjMat; 9 | 10 | out vec4 vertexColor; 11 | out vec2 texCoord0; 12 | 13 | void main() { 14 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 15 | 16 | vertexColor = Color; 17 | texCoord0 = UV0; 18 | } 19 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/clouds.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | uniform vec4 FogColor; 11 | 12 | in vec2 texCoord0; 13 | in float vertexDistance; 14 | in vec4 vertexColor; 15 | in vec4 normal; 16 | 17 | out vec4 fragColor; 18 | 19 | void main() { 20 | vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; 21 | if (color.a < 0.1) discard; 22 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 23 | } 24 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/clouds.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | in vec2 UV0; 7 | in vec4 Color; 8 | in vec3 Normal; 9 | 10 | uniform mat4 ModelViewMat; 11 | uniform mat4 ProjMat; 12 | uniform int FogShape; 13 | 14 | out vec2 texCoord0; 15 | out float vertexDistance; 16 | out vec4 vertexColor; 17 | out vec4 normal; 18 | 19 | void main() { 20 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 21 | 22 | texCoord0 = UV0; 23 | vertexDistance = fog_distance(Position, FogShape); 24 | vertexColor = Color; 25 | normal = ProjMat * ModelViewMat * vec4(Normal, 0.0); 26 | } 27 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/crumbling.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | uniform sampler2D Sampler0; 4 | 5 | uniform vec4 ColorModulator; 6 | 7 | in vec4 vertexColor; 8 | in vec2 texCoord0; 9 | 10 | out vec4 fragColor; 11 | 12 | void main() { 13 | vec4 color = texture(Sampler0, texCoord0) * vertexColor; 14 | if (color.a < 0.1) discard; 15 | fragColor = color * ColorModulator; 16 | } 17 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/crumbling.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec3 Position; 4 | in vec4 Color; 5 | in vec2 UV0; 6 | in vec3 Normal; 7 | 8 | uniform mat4 ModelViewMat; 9 | uniform mat4 ProjMat; 10 | 11 | out vec4 vertexColor; 12 | out vec2 texCoord0; 13 | 14 | void main() { 15 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 16 | 17 | vertexColor = Color; 18 | texCoord0 = UV0; 19 | } 20 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/end_crystal_beam.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | uniform vec4 FogColor; 11 | 12 | in vec2 texCoord0; 13 | in float vertexDistance; 14 | in vec4 vertexColor; 15 | in vec4 lightColor; 16 | in vec4 overlayColor; 17 | 18 | out vec4 fragColor; 19 | 20 | void main() { 21 | vec4 color = texture(Sampler0, texCoord0); 22 | if (color.a < 0.1) discard; 23 | color *= vertexColor * ColorModulator; 24 | color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a); 25 | color *= lightColor; 26 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 27 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/end_crystal_beam.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | #moj_import 5 | 6 | in vec3 Position; 7 | in vec4 Color; 8 | in vec2 UV0; 9 | in ivec2 UV1; 10 | in ivec2 UV2; 11 | in vec3 Normal; 12 | 13 | uniform sampler2D Sampler1; 14 | uniform sampler2D Sampler2; 15 | 16 | uniform mat4 ModelViewMat; 17 | uniform mat4 ProjMat; 18 | uniform int FogShape; 19 | 20 | uniform vec3 Light0_Direction; 21 | uniform vec3 Light1_Direction; 22 | 23 | out vec2 texCoord0; 24 | out float vertexDistance; 25 | out vec4 vertexColor; 26 | out vec4 lightColor; 27 | out vec4 overlayColor; 28 | 29 | void main() { 30 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 31 | 32 | vertexDistance = fog_distance(Position, FogShape); 33 | vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); 34 | lightColor = minecraft_sample_lightmap(Sampler2, UV2); 35 | overlayColor = texelFetch(Sampler1, UV1, 0); 36 | texCoord0 = UV0; 37 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/end_portal.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | uniform sampler2D Sampler1; 7 | 8 | uniform float GameTime; 9 | uniform int EndPortalLayers; 10 | 11 | in vec4 texProj0; 12 | 13 | out vec4 fragColor; 14 | 15 | const vec3[] COLORS = vec3[]( 16 | vec3(0.022087, 0.098399, 0.110818), 17 | vec3(0.011892, 0.095924, 0.089485), 18 | vec3(0.027636, 0.101689, 0.100326), 19 | vec3(0.046564, 0.109883, 0.114838), 20 | vec3(0.064901, 0.117696, 0.097189), 21 | vec3(0.063761, 0.086895, 0.123646), 22 | vec3(0.084817, 0.111994, 0.166380), 23 | vec3(0.097489, 0.154120, 0.091064), 24 | vec3(0.106152, 0.131144, 0.195191), 25 | vec3(0.097721, 0.110188, 0.187229), 26 | vec3(0.133516, 0.138278, 0.148582), 27 | vec3(0.070006, 0.243332, 0.235792), 28 | vec3(0.196766, 0.142899, 0.214696), 29 | vec3(0.047281, 0.315338, 0.321970), 30 | vec3(0.204675, 0.390010, 0.302066), 31 | vec3(0.080955, 0.314821, 0.661491) 32 | ); 33 | 34 | const mat4 SCALE_TRANSLATE = mat4( 35 | 0.5, 0.0, 0.0, 0.25, 36 | 0.0, 0.5, 0.0, 0.25, 37 | 0.0, 0.0, 1.0, 0.0, 38 | 0.0, 0.0, 0.0, 1.0 39 | ); 40 | 41 | mat4 end_portal_layer(float layer) { 42 | mat4 translate = mat4( 43 | 1.0, 0.0, 0.0, 17.0 / layer, 44 | 0.0, 1.0, 0.0, (2.0 + layer / 1.5) * (GameTime * 1.5), 45 | 0.0, 0.0, 1.0, 0.0, 46 | 0.0, 0.0, 0.0, 1.0 47 | ); 48 | mat2 rotate = mat2_rotate_z(radians((layer * layer * 4321.0 + layer * 9.0) * 2.0)); 49 | mat2 scale = mat2((4.5 - layer / 4.0) * 2.0); 50 | return mat4(scale * rotate) * translate * SCALE_TRANSLATE; 51 | } 52 | 53 | void main() { 54 | vec3 color = textureProj(Sampler0, texProj0).rgb * COLORS[0]; 55 | for (int i = 0; i < EndPortalLayers; i++) { 56 | color += textureProj(Sampler1, texProj0 * end_portal_layer(float(i + 1))).rgb * COLORS[i]; 57 | } 58 | fragColor = vec4(color, 1.0); 59 | } 60 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/end_portal.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | 7 | uniform mat4 ModelViewMat; 8 | uniform mat4 ProjMat; 9 | 10 | out vec4 texProj0; 11 | 12 | void main() { 13 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 14 | texProj0 = projection_from_position(gl_Position); 15 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/energy_swirl.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | 11 | in float vertexDistance; 12 | in vec4 vertexColor; 13 | in vec2 texCoord0; 14 | 15 | out vec4 fragColor; 16 | 17 | void main() { 18 | vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; 19 | if (color.a < 0.1) { 20 | discard; 21 | } 22 | fragColor = color * linear_fog_fade(vertexDistance, FogStart, FogEnd); 23 | } 24 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/energy_swirl.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | in vec4 Color; 7 | in vec2 UV0; 8 | 9 | uniform mat4 ModelViewMat; 10 | uniform mat4 ProjMat; 11 | uniform mat4 TextureMat; 12 | uniform int FogShape; 13 | 14 | out float vertexDistance; 15 | out vec4 vertexColor; 16 | out vec2 texCoord0; 17 | 18 | void main() { 19 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 20 | 21 | vertexDistance = fog_distance(Position, FogShape); 22 | vertexColor = Color; 23 | texCoord0 = (TextureMat * vec4(UV0, 0.0, 1.0)).xy; 24 | } 25 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/eyes.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | 11 | in float vertexDistance; 12 | in vec4 vertexColor; 13 | in vec2 texCoord0; 14 | 15 | out vec4 fragColor; 16 | 17 | void main() { 18 | vec4 color = texture(Sampler0, texCoord0) * vertexColor; 19 | fragColor = color * ColorModulator * linear_fog_fade(vertexDistance, FogStart, FogEnd); 20 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/eyes.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | in vec4 Color; 7 | in vec2 UV0; 8 | 9 | uniform mat4 ModelViewMat; 10 | uniform mat4 ProjMat; 11 | uniform int FogShape; 12 | 13 | out float vertexDistance; 14 | out vec4 vertexColor; 15 | out vec2 texCoord0; 16 | 17 | void main() { 18 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 19 | 20 | vertexDistance = fog_distance(Position, FogShape); 21 | vertexColor = Color; 22 | texCoord0 = UV0; 23 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/glint.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | uniform float GlintAlpha; 11 | 12 | in float vertexDistance; 13 | in vec2 texCoord0; 14 | 15 | out vec4 fragColor; 16 | 17 | void main() { 18 | vec4 color = texture(Sampler0, texCoord0) * ColorModulator; 19 | if (color.a < 0.1) discard; 20 | float fade = linear_fog_fade(vertexDistance, FogStart, FogEnd) * GlintAlpha; 21 | fragColor = vec4(color.rgb * fade, color.a); 22 | } 23 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/glint_armor.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | in vec2 UV0; 7 | 8 | uniform mat4 ModelViewMat; 9 | uniform mat4 ProjMat; 10 | uniform mat4 TextureMat; 11 | uniform int FogShape; 12 | 13 | out float vertexDistance; 14 | out vec2 texCoord0; 15 | 16 | void main() { 17 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 18 | 19 | vertexDistance = fog_distance(Position, FogShape); 20 | texCoord0 = (TextureMat * vec4(UV0, 0.0, 1.0)).xy; 21 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/glint_item.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | in vec2 UV0; 7 | 8 | uniform mat4 ModelViewMat; 9 | uniform mat4 ProjMat; 10 | uniform mat4 TextureMat; 11 | uniform int FogShape; 12 | 13 | out float vertexDistance; 14 | out vec2 texCoord0; 15 | 16 | void main() { 17 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 18 | 19 | vertexDistance = fog_distance(Position, FogShape); 20 | texCoord0 = (TextureMat * vec4(UV0, 0.0, 1.0)).xy; 21 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/gui_overlay.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 vertexColor; 4 | 5 | uniform vec4 ColorModulator; 6 | 7 | out vec4 fragColor; 8 | 9 | void main() { 10 | vec4 color = vertexColor; 11 | if (color.a == 0.0) discard; 12 | fragColor = color * ColorModulator; 13 | } 14 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/gui_overlay.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec3 Position; 4 | in vec4 Color; 5 | 6 | uniform mat4 ModelViewMat; 7 | uniform mat4 ProjMat; 8 | 9 | out vec4 vertexColor; 10 | 11 | void main() { 12 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 13 | vertexColor = Color; 14 | } 15 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/gui_texture.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | uniform sampler2D Sampler0; 4 | 5 | uniform vec4 ColorModulator; 6 | 7 | in vec2 texCoord0; 8 | 9 | out vec4 fragColor; 10 | 11 | void main() { 12 | vec4 color = texture(Sampler0, texCoord0); 13 | if (color.a == 0.0) discard; 14 | fragColor = color * ColorModulator; 15 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/gui_texture.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec3 Position; 4 | in vec2 UV0; 5 | 6 | uniform mat4 ModelViewMat; 7 | uniform mat4 ProjMat; 8 | 9 | out vec2 texCoord0; 10 | 11 | void main() { 12 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 13 | texCoord0 = UV0; 14 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/leash.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform float FogStart; 6 | uniform float FogEnd; 7 | uniform vec4 FogColor; 8 | 9 | in float vertexDistance; 10 | flat in vec4 vertexColor; 11 | 12 | out vec4 fragColor; 13 | 14 | void main() { 15 | fragColor = linear_fog(vertexColor, vertexDistance, FogStart, FogEnd, FogColor); 16 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/leash.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | #moj_import 5 | 6 | in vec3 Position; 7 | in vec4 Color; 8 | in ivec2 UV2; 9 | 10 | uniform sampler2D Sampler2; 11 | 12 | uniform mat4 ModelViewMat; 13 | uniform mat4 ProjMat; 14 | uniform vec4 ColorModulator; 15 | uniform int FogShape; 16 | 17 | out float vertexDistance; 18 | flat out vec4 vertexColor; 19 | out vec4 lightColor; 20 | 21 | void main() { 22 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 23 | 24 | vertexDistance = fog_distance(Position, FogShape); 25 | vertexColor = Color * ColorModulator * minecraft_sample_lightmap(Sampler2, UV2); 26 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/lightning.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform vec4 ColorModulator; 6 | uniform float FogStart; 7 | uniform float FogEnd; 8 | 9 | in float vertexDistance; 10 | in vec4 vertexColor; 11 | 12 | out vec4 fragColor; 13 | 14 | void main() { 15 | fragColor = vertexColor * ColorModulator * linear_fog_fade(vertexDistance, FogStart, FogEnd); 16 | } 17 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/lightning.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | in vec4 Color; 7 | 8 | uniform mat4 ModelViewMat; 9 | uniform mat4 ProjMat; 10 | uniform int FogShape; 11 | 12 | out float vertexDistance; 13 | out vec4 vertexColor; 14 | 15 | void main() { 16 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 17 | 18 | vertexDistance = fog_distance(Position, FogShape); 19 | vertexColor = Color; 20 | } 21 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/lines.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform vec4 ColorModulator; 6 | uniform float FogStart; 7 | uniform float FogEnd; 8 | uniform vec4 FogColor; 9 | 10 | in float vertexDistance; 11 | in vec4 vertexColor; 12 | 13 | out vec4 fragColor; 14 | 15 | void main() { 16 | vec4 color = vertexColor * ColorModulator; 17 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 18 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/lines.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | in vec4 Color; 7 | in vec3 Normal; 8 | 9 | uniform mat4 ModelViewMat; 10 | uniform mat4 ProjMat; 11 | uniform float LineWidth; 12 | uniform vec2 ScreenSize; 13 | uniform int FogShape; 14 | 15 | out float vertexDistance; 16 | out vec4 vertexColor; 17 | 18 | const float VIEW_SHRINK = 1.0 - (1.0 / 256.0); 19 | const mat4 VIEW_SCALE = mat4( 20 | VIEW_SHRINK, 0.0, 0.0, 0.0, 21 | 0.0, VIEW_SHRINK, 0.0, 0.0, 22 | 0.0, 0.0, VIEW_SHRINK, 0.0, 23 | 0.0, 0.0, 0.0, 1.0 24 | ); 25 | 26 | void main() { 27 | vec4 linePosStart = ProjMat * VIEW_SCALE * ModelViewMat * vec4(Position, 1.0); 28 | vec4 linePosEnd = ProjMat * VIEW_SCALE * ModelViewMat * vec4(Position + Normal, 1.0); 29 | 30 | vec3 ndc1 = linePosStart.xyz / linePosStart.w; 31 | vec3 ndc2 = linePosEnd.xyz / linePosEnd.w; 32 | 33 | vec2 lineScreenDirection = normalize((ndc2.xy - ndc1.xy) * ScreenSize); 34 | vec2 lineOffset = vec2(-lineScreenDirection.y, lineScreenDirection.x) * LineWidth / ScreenSize; 35 | 36 | if (lineOffset.x < 0.0) { 37 | lineOffset *= -1.0; 38 | } 39 | 40 | if (gl_VertexID % 2 == 0) { 41 | gl_Position = vec4((ndc1 + vec3(lineOffset, 0.0)) * linePosStart.w, linePosStart.w); 42 | } else { 43 | gl_Position = vec4((ndc1 - vec3(lineOffset, 0.0)) * linePosStart.w, linePosStart.w); 44 | } 45 | 46 | vertexDistance = fog_distance(Position, FogShape); 47 | vertexColor = Color; 48 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/outline.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | uniform sampler2D Sampler0; 4 | 5 | uniform vec4 ColorModulator; 6 | 7 | in vec4 vertexColor; 8 | in vec2 texCoord0; 9 | 10 | out vec4 fragColor; 11 | 12 | void main() { 13 | vec4 color = texture(Sampler0, texCoord0); 14 | if (color.a == 0.0) discard; 15 | fragColor = vec4(ColorModulator.rgb * vertexColor.rgb, ColorModulator.a); 16 | } 17 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/outline.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec3 Position; 4 | in vec4 Color; 5 | in vec2 UV0; 6 | 7 | uniform mat4 ModelViewMat; 8 | uniform mat4 ProjMat; 9 | 10 | out vec4 vertexColor; 11 | out vec2 texCoord0; 12 | 13 | void main() { 14 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 15 | 16 | vertexColor = Color; 17 | texCoord0 = UV0; 18 | } 19 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/particle.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | uniform vec4 FogColor; 11 | 12 | in float vertexDistance; 13 | in vec4 vertexColor; 14 | in vec4 lightColor; 15 | in vec2 texCoord0; 16 | 17 | out vec4 fragColor; 18 | 19 | void main() { 20 | vec4 color = texture(Sampler0, texCoord0) * vertexColor * lightColor * ColorModulator; 21 | if (color.a < 0.1) discard; 22 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 23 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/particle.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | #moj_import 5 | 6 | in vec3 Position; 7 | in vec2 UV0; 8 | in vec4 Color; 9 | in ivec2 UV2; 10 | 11 | uniform sampler2D Sampler2; 12 | 13 | uniform mat4 ModelViewMat; 14 | uniform mat4 ProjMat; 15 | uniform int FogShape; 16 | 17 | out float vertexDistance; 18 | out vec4 vertexColor; 19 | out vec4 lightColor; 20 | out vec2 texCoord0; 21 | 22 | void main() { 23 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 24 | vertexDistance = fog_distance(Position, FogShape); 25 | texCoord0 = UV0; 26 | vertexColor = Color; 27 | lightColor = minecraft_sample_lightmap(Sampler2, UV2); 28 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/shadow.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | uniform vec4 FogColor; 11 | 12 | in float vertexDistance; 13 | in vec4 vertexColor; 14 | in vec2 texCoord0; 15 | 16 | out vec4 fragColor; 17 | 18 | void main() { 19 | vec4 color = texture(Sampler0, clamp(texCoord0, 0.0, 1.0)); 20 | color *= vertexColor * ColorModulator; 21 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 22 | } 23 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/shadow.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | in vec4 Color; 7 | in vec2 UV0; 8 | 9 | uniform mat4 ModelViewMat; 10 | uniform mat4 ProjMat; 11 | uniform int FogShape; 12 | 13 | out float vertexDistance; 14 | out vec4 vertexColor; 15 | out vec2 texCoord0; 16 | 17 | void main() { 18 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 19 | vertexDistance = fog_distance(Position, FogShape); 20 | vertexColor = Color; 21 | texCoord0 = UV0; 22 | } 23 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/text.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | uniform vec4 FogColor; 11 | 12 | in float vertexDistance; 13 | in vec4 vertexColor; 14 | in vec4 lightColor; 15 | in vec2 texCoord0; 16 | 17 | out vec4 fragColor; 18 | 19 | void main() { 20 | vec4 color = texture(Sampler0, texCoord0) * vertexColor * lightColor * ColorModulator; 21 | if (color.a < 0.1) discard; 22 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 23 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/text.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | #moj_import 5 | 6 | in vec3 Position; 7 | in vec4 Color; 8 | in vec2 UV0; 9 | in ivec2 UV2; 10 | 11 | uniform sampler2D Sampler2; 12 | 13 | uniform mat4 ModelViewMat; 14 | uniform mat4 ProjMat; 15 | uniform int FogShape; 16 | 17 | out float vertexDistance; 18 | out vec4 vertexColor; 19 | out vec4 lightColor; 20 | out vec2 texCoord0; 21 | 22 | void main() { 23 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 24 | vertexDistance = fog_distance(Position, FogShape); 25 | vertexColor = Color; 26 | lightColor = minecraft_sample_lightmap(Sampler2, UV2); 27 | texCoord0 = UV0; 28 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/warden_emissive.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | 11 | in float vertexDistance; 12 | in vec4 vertexColor; 13 | in vec4 overlayColor; 14 | in vec2 texCoord0; 15 | 16 | out vec4 fragColor; 17 | 18 | void main() { 19 | vec4 color = texture(Sampler0, texCoord0); 20 | if (color.a < 0.1) discard; 21 | color *= vertexColor * ColorModulator; 22 | color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a); 23 | fragColor = color * linear_fog_fade(vertexDistance, FogStart, FogEnd); 24 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/render/warden_emissive.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | in vec3 Position; 6 | in vec4 Color; 7 | in vec2 UV0; 8 | in ivec2 UV1; 9 | in vec3 Normal; 10 | 11 | uniform sampler2D Sampler1; 12 | 13 | uniform mat4 ModelViewMat; 14 | uniform mat4 ProjMat; 15 | 16 | uniform vec3 Light0_Direction; 17 | uniform vec3 Light1_Direction; 18 | 19 | out float vertexDistance; 20 | out vec4 vertexColor; 21 | out vec4 overlayColor; 22 | out vec2 texCoord0; 23 | 24 | void main() { 25 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 26 | 27 | vertexDistance = length((ModelViewMat * vec4(Position, 1.0)).xyz); 28 | vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); 29 | overlayColor = texelFetch(Sampler1, UV1, 0); 30 | texCoord0 = UV0; 31 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/armor", 8 | "fragment": "render/armor", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 17 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 18 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 20 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 21 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 22 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 23 | ] 24 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_armor_entity_glint.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/glint_armor", 8 | "fragment": "render/glint", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, 20 | { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } 21 | ] 22 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_armor_glint.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/glint_armor", 8 | "fragment": "render/glint", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, 20 | { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } 21 | ] 22 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_beacon_beam.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/beacon_beam", 8 | "fragment": "render/beacon_beam", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 17 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 18 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] } 19 | ] 20 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_clouds.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/clouds", 8 | "fragment": "render/clouds", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 17 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 18 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_crumbling.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/crumbling", 8 | "fragment": "render/crumbling", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 16 | ] 17 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_cutout.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/block_cutout", 8 | "fragment": "shared/block_cutout", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ChunkOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 19 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 20 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 21 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 22 | ] 23 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_cutout_mipped.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/block_cutout_mipped", 8 | "fragment": "shared/block_cutout_mipped", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ChunkOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 19 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 20 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 21 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 22 | ] 23 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_end_gateway.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/end_portal", 8 | "fragment": "render/end_portal", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler1" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "GameTime", "type": "float", "count": 1, "values": [ 0.0 ] }, 17 | { "name": "EndPortalLayers", "type": "int", "count": 1, "values": [ 16 ] } 18 | ] 19 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_end_portal.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/end_portal", 8 | "fragment": "render/end_portal", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler1" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "GameTime", "type": "float", "count": 1, "values": [ 0.0 ] }, 17 | { "name": "EndPortalLayers", "type": "int", "count": 1, "values": [ 15 ] } 18 | ] 19 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_energy_swirl.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/energy_swirl", 8 | "fragment": "render/energy_swirl", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 20 | ] 21 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_cutout.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/entity_cutout", 8 | "fragment": "shared/entity_cutout", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler1" }, 12 | { "name": "Sampler2" } 13 | ], 14 | "uniforms": [ 15 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 20 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 21 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 22 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 23 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 24 | ] 25 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/entity_cutout_no_cull", 8 | "fragment": "shared/entity_cutout_no_cull", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler1" }, 12 | { "name": "Sampler2" } 13 | ], 14 | "uniforms": [ 15 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 20 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 21 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 22 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 23 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 24 | ] 25 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull_z_offset.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/entity_cutout_no_cull_z_offset", 8 | "fragment": "shared/entity_cutout_no_cull_z_offset", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler1" }, 12 | { "name": "Sampler2" } 13 | ], 14 | "uniforms": [ 15 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 20 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 21 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 22 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 23 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 24 | ] 25 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_glint.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/glint_item", 8 | "fragment": "render/glint", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, 20 | { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } 21 | ] 22 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_glint_direct.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/glint_item", 8 | "fragment": "render/glint", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, 20 | { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } 21 | ] 22 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_no_outline.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/entity_no_outline", 8 | "fragment": "shared/entity_no_outline", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 17 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 18 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 20 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 21 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 22 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 23 | ] 24 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_shadow.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/shadow", 8 | "fragment": "render/shadow", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 17 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 18 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 20 | ] 21 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_smooth_cutout.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/end_crystal_beam", 8 | "fragment": "render/end_crystal_beam", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler1" }, 12 | { "name": "Sampler2" } 13 | ], 14 | "uniforms": [ 15 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 20 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 21 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 22 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 23 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 24 | ] 25 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_solid.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/entity_solid", 8 | "fragment": "shared/entity_solid", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler1" }, 12 | { "name": "Sampler2" } 13 | ], 14 | "uniforms": [ 15 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 20 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 21 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 22 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 23 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 24 | ] 25 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_translucent.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/entity_translucent", 8 | "fragment": "shared/entity_translucent", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler1" }, 12 | { "name": "Sampler2" } 13 | ], 14 | "uniforms": [ 15 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 20 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 21 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 22 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 23 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 24 | ] 25 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_translucent_cull.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/entity_translucent_cull", 8 | "fragment": "shared/entity_translucent_cull", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 17 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 18 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 20 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 21 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 22 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 23 | ] 24 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_entity_translucent_emissive.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/warden_emissive", 8 | "fragment": "render/warden_emissive", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler1" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 17 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 18 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 20 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_eyes.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "rendertype_eyes", 8 | "fragment": "rendertype_eyes", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 17 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 18 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 19 | ] 20 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_glint_direct.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/glint_item", 8 | "fragment": "render/glint", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, 20 | { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } 21 | ] 22 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_glint_translucent.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/glint_item", 8 | "fragment": "render/glint", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "GlintAlpha", "type": "float", "count": 1, "values": [ 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, 20 | { "name": "TextureMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] } 21 | ] 22 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_gui.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/gui_overlay", 8 | "fragment": "render/gui_overlay", 9 | "samplers": [ 10 | ], 11 | "uniforms": [ 12 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 13 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_gui_ghost_recipe_overlay.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/gui_overlay", 8 | "fragment": "render/gui_overlay", 9 | "samplers": [ 10 | ], 11 | "uniforms": [ 12 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 13 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 15 | ] 16 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_gui_overlay.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/gui_overlay", 8 | "fragment": "render/gui_overlay", 9 | "samplers": [ 10 | ], 11 | "uniforms": [ 12 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 13 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 15 | ] 16 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_gui_text_highlight.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/gui_overlay", 8 | "fragment": "render/gui_overlay", 9 | "samplers": [ 10 | ], 11 | "uniforms": [ 12 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 13 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 15 | ] 16 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/entity_item_translucent_cull", 8 | "fragment": "shared/entity_item_translucent_cull", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 17 | { "name": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 18 | { "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, 19 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 20 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 21 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 22 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 23 | ] 24 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_leash.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/leash", 8 | "fragment": "render/leash", 9 | "samplers": [ 10 | { "name": "Sampler2" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 16 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 17 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 18 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 19 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 20 | ] 21 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_lightning.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/lightning", 8 | "fragment": "render/lightning", 9 | "samplers": [ 10 | ], 11 | "uniforms": [ 12 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 13 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 15 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 16 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 17 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 18 | ] 19 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_lines.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/lines", 8 | "fragment": "render/lines", 9 | "samplers": [ 10 | ], 11 | "uniforms": [ 12 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 13 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 15 | { "name": "LineWidth", "type": "float", "count": 1, "values": [ 1.0 ] }, 16 | { "name": "ScreenSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 20 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 21 | ] 22 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_outline.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/outline", 8 | "fragment": "render/outline", 9 | "samplers": [ 10 | { "name": "Sampler0" } 11 | ], 12 | "uniforms": [ 13 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 14 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 16 | ] 17 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_solid.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/block_solid", 8 | "fragment": "shared/block_solid", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ChunkOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 19 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 20 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 21 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 22 | ] 23 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_text.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "render/text", 8 | "fragment": "render/text", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 17 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 18 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 19 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 20 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 21 | ] 22 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_translucent.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/block_translucent", 8 | "fragment": "shared/block_translucent", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ChunkOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 19 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 20 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 21 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 22 | ] 23 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/rendertype_tripwire.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "shared/block_tripwire", 8 | "fragment": "shared/block_tripwire", 9 | "samplers": [ 10 | { "name": "Sampler0" }, 11 | { "name": "Sampler2" } 12 | ], 13 | "uniforms": [ 14 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 15 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 16 | { "name": "ChunkOffset", "type": "float", "count": 3, "values": [ 0.0, 0.0, 0.0 ] }, 17 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }, 18 | { "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, 19 | { "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, 20 | { "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, 21 | { "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] } 22 | ] 23 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_cutout.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define CUTOUT 4 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_cutout.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define CUTOUT 4 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_cutout_mipped.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define MIPPED 4 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_cutout_mipped.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define MIPPED 4 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_solid.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define SOLID 3 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_solid.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define SOLID 3 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_translucent.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define TRANSLUCENT 3 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_translucent.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define TRANSLUCENT 3 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_tripwire.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define TRIPWIRE 4 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/block_tripwire.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define TRIPWIRE 4 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_cutout.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define CUTOUT 4 | #define OVERLAY 5 | #define ITEM 6 | #define BLOCK 7 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_cutout.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define CUTOUT 4 | #define OVERLAY 5 | #define ITEM 6 | #define BLOCK 7 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_cutout_no_cull.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define OVERLAY 4 | #define CUTOUT_NO_CULL 5 | #define ITEM 6 | #define MOB 7 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_cutout_no_cull.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define OVERLAY 4 | #define CUTOUT_NO_CULL 5 | #define ITEM 6 | #define MOB 7 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_cutout_no_cull_z_offset.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define OVERLAY 4 | #define CUTOUT_NO_CULL_Z_OFFSET 5 | #define ITEM 6 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_cutout_no_cull_z_offset.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define OVERLAY 4 | #define CUTOUT_NO_CULL_Z_OFFSET 5 | #define ITEM 6 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_item_translucent_cull.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define ITEM_TRANSLUCENT_CULL 4 | #define MOB 5 | #define ITEM 6 | #define XPORB 7 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_item_translucent_cull.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define ITEM_TRANSLUCENT_CULL 4 | #define MOB 5 | #define ITEM 6 | #define XPORB 7 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_no_outline.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define NO_OUTLINE 3 | #define BANNER_PATTERN 4 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_no_outline.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define NO_OUTLINE 3 | #define BANNER_PATTERN 4 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_solid.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define OVERLAY 3 | #define SOLID 4 | #define PLAYER 5 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_solid.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define OVERLAY 3 | #define SOLID 4 | #define PLAYER 5 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_translucent.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define OVERLAY 4 | #define TRANSLUCENT 5 | #define PLAYER 6 | #define MOB 7 | #define ITEM 8 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_translucent.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define OVERLAY 4 | #define TRANSLUCENT 5 | #define PLAYER 6 | #define MOB 7 | #define ITEM 8 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_translucent_cull.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define TRANSLUCENT_CULL 4 | #define ITEM 5 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/core/shared/entity_translucent_cull.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | #define DISCARD 3 | #define TRANSLUCENT_CULL 4 | #define ITEM 5 | #moj_import -------------------------------------------------------------------------------- /assets/minecraft/shaders/include/config.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #define DISCARD_THRESHOLD 0.1 -------------------------------------------------------------------------------- /assets/minecraft/shaders/include/fog.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | vec4 linear_fog(vec4 inColor, float vertexDistance, float fogStart, float fogEnd, vec4 fogColor) { 4 | if (vertexDistance <= fogStart) { 5 | return inColor; 6 | } 7 | float fogValue = vertexDistance < fogEnd ? smoothstep(fogStart, fogEnd, vertexDistance) : 1.0; 8 | return vec4(mix(inColor.rgb, fogColor.rgb, fogValue * fogColor.a), inColor.a); 9 | } 10 | 11 | float linear_fog_fade(float vertexDistance, float fogStart, float fogEnd) { 12 | if (vertexDistance <= fogStart) { 13 | return 1.0; 14 | } else if (vertexDistance >= fogEnd) { 15 | return 0.0; 16 | } 17 | return smoothstep(fogEnd, fogStart, vertexDistance); 18 | } 19 | 20 | float fog_distance(vec3 pos, int shape) { 21 | if (shape == 0) { 22 | return length(pos); 23 | } else { 24 | float distXZ = length(pos.xz); 25 | float distY = abs(pos.y); 26 | return max(distXZ, distY); 27 | } 28 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/include/light.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #define MINECRAFT_LIGHT_POWER (0.6) 4 | #define MINECRAFT_AMBIENT_LIGHT (0.4) 5 | 6 | vec4 minecraft_mix_light(vec3 lightDir0, vec3 lightDir1, vec3 normal, vec4 color) { 7 | lightDir0 = normalize(lightDir0); 8 | lightDir1 = normalize(lightDir1); 9 | float light0 = max(0.0, dot(lightDir0, normal)); 10 | float light1 = max(0.0, dot(lightDir1, normal)); 11 | float lightAccum = min(1.0, (light0 + light1) * MINECRAFT_LIGHT_POWER + MINECRAFT_AMBIENT_LIGHT); 12 | return vec4(color.rgb * lightAccum, color.a); 13 | } 14 | 15 | vec4 minecraft_sample_lightmap(sampler2D lightMap, ivec2 uv) { 16 | return texture(lightMap, clamp(uv / 256.0, vec2(0.5 / 16.0), vec2(15.5 / 16.0))); 17 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/include/matrix.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | mat2 mat2_rotate_z(float radians) { 4 | return mat2( 5 | cos(radians), -sin(radians), 6 | sin(radians), cos(radians) 7 | ); 8 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/include/projection.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | vec4 projection_from_position(vec4 position) { 4 | vec4 projection = position * 0.5; 5 | projection.xy = vec2(projection.x + projection.w, projection.y + projection.w); 6 | projection.zw = position.zw; 7 | return projection; 8 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/include/render/block.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | #moj_import 5 | 6 | uniform sampler2D Sampler0; 7 | 8 | uniform vec4 ColorModulator; 9 | uniform float FogStart; 10 | uniform float FogEnd; 11 | uniform vec4 FogColor; 12 | 13 | in float vertexDistance; 14 | in vec4 vertexColor; 15 | in vec4 lightColor; 16 | in vec2 texCoord0; 17 | in vec4 normal; 18 | 19 | out vec4 fragColor; 20 | 21 | void main() { 22 | vec4 color = texture(Sampler0, texCoord0); 23 | #ifdef DISCARD 24 | if (color.a < DISCARD_THRESHOLD) discard; 25 | #endif 26 | color *= vertexColor * lightColor * ColorModulator; 27 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 28 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/include/render/block.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | #moj_import 5 | 6 | in vec3 Position; 7 | in vec4 Color; 8 | in vec2 UV0; 9 | in ivec2 UV2; 10 | in vec3 Normal; 11 | 12 | uniform sampler2D Sampler2; 13 | 14 | uniform mat4 ModelViewMat; 15 | uniform mat4 ProjMat; 16 | uniform vec3 ChunkOffset; 17 | uniform int FogShape; 18 | 19 | out float vertexDistance; 20 | out vec4 vertexColor; 21 | out vec4 lightColor; 22 | out vec2 texCoord0; 23 | out vec4 normal; 24 | 25 | void main() { 26 | vec3 pos = Position + ChunkOffset; 27 | gl_Position = ProjMat * ModelViewMat * vec4(pos, 1.0); 28 | 29 | vertexDistance = fog_distance(pos, FogShape); 30 | vertexColor = Color; 31 | lightColor = minecraft_sample_lightmap(Sampler2, UV2); 32 | texCoord0 = UV0; 33 | normal = ProjMat * ModelViewMat * vec4(Normal, 0.0); 34 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/include/render/entity.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | #moj_import 5 | 6 | uniform sampler2D Sampler0; 7 | 8 | uniform vec4 ColorModulator; 9 | uniform float FogStart; 10 | uniform float FogEnd; 11 | uniform vec4 FogColor; 12 | 13 | in vec2 texCoord0; 14 | in float vertexDistance; 15 | in vec4 vertexColor; 16 | in vec4 lightColor; 17 | #ifdef OVERLAY 18 | in vec4 overlayColor; 19 | #endif 20 | 21 | out vec4 fragColor; 22 | 23 | void main() { 24 | vec4 color = texture(Sampler0, texCoord0); 25 | #ifdef DISCARD 26 | if (color.a < DISCARD_THRESHOLD) discard; 27 | #endif 28 | color *= vertexColor * ColorModulator; 29 | #ifdef OVERLAY 30 | color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a); 31 | #endif 32 | color *= lightColor; 33 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 34 | } -------------------------------------------------------------------------------- /assets/minecraft/shaders/include/render/entity.vsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | #moj_import 5 | 6 | in vec3 Position; 7 | in vec4 Color; 8 | in vec2 UV0; 9 | in ivec2 UV1; 10 | in ivec2 UV2; 11 | in vec3 Normal; 12 | 13 | uniform sampler2D Sampler1; 14 | uniform sampler2D Sampler2; 15 | 16 | uniform mat4 ModelViewMat; 17 | uniform mat4 ProjMat; 18 | uniform int FogShape; 19 | 20 | uniform vec3 Light0_Direction; 21 | uniform vec3 Light1_Direction; 22 | 23 | out vec2 texCoord0; 24 | out float vertexDistance; 25 | out vec4 vertexColor; 26 | out vec4 lightColor; 27 | 28 | #ifdef OVERLAY 29 | out vec4 overlayColor; 30 | #endif 31 | 32 | void main() { 33 | gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); 34 | 35 | vertexDistance = fog_distance(Position, FogShape); 36 | vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color); 37 | lightColor = minecraft_sample_lightmap(Sampler2, UV2); 38 | #ifdef OVERLAY 39 | overlayColor = texelFetch(Sampler1, UV1, 0); 40 | #endif 41 | texCoord0 = UV0; 42 | } -------------------------------------------------------------------------------- /pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "pack_format": 32, 4 | "description": "by Godlander" 5 | } 6 | } --------------------------------------------------------------------------------