Skip to content

Commit 001f717

Browse files
committed
update for 1.21.3
1 parent 5b22077 commit 001f717

File tree

12 files changed

+16
-73
lines changed

12 files changed

+16
-73
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.zip

assets/minecraft/shaders/core/render/armor.fsh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#version 150
22

3-
#moj_import <fog.glsl>
3+
#moj_import <minecraft:fog.glsl>
44

55
uniform sampler2D Sampler0;
66

@@ -13,17 +13,14 @@ in float vertexDistance;
1313
in vec4 vertexColor;
1414
in vec4 tintColor;
1515
in vec4 lightColor;
16-
in vec4 overlayColor;
1716
in vec2 uv;
18-
in vec4 normal;
1917

2018
out vec4 fragColor;
2119

2220
void main() {
2321
vec4 color = texture(Sampler0, uv);
2422
if (color.a < 0.1) discard;
2523
color *= tintColor * ColorModulator;
26-
color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a);
2724
color *= vertexColor * lightColor; //shading
2825
fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor);
2926
}

assets/minecraft/shaders/core/render/armor.vsh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#version 150
22

3-
#moj_import <light.glsl>
4-
#moj_import <fog.glsl>
3+
#moj_import <minecraft:light.glsl>
4+
#moj_import <minecraft:fog.glsl>
55

66
in vec3 Position;
77
in vec4 Color;
@@ -11,11 +11,11 @@ in ivec2 UV2;
1111
in vec3 Normal;
1212

1313
uniform sampler2D Sampler0;
14-
uniform sampler2D Sampler1;
1514
uniform sampler2D Sampler2;
1615

1716
uniform mat4 ModelViewMat;
1817
uniform mat4 ProjMat;
18+
uniform mat4 TextureMat;
1919
uniform int FogShape;
2020

2121
uniform vec3 Light0_Direction;
@@ -27,7 +27,6 @@ out vec4 tintColor;
2727
out vec4 lightColor;
2828
out vec4 overlayColor;
2929
out vec2 uv;
30-
out vec4 normal;
3130

3231
int toint(vec3 c) {
3332
ivec3 v = ivec3(c*255);
@@ -40,10 +39,8 @@ void main() {
4039
vertexDistance = fog_distance(Position, FogShape);
4140
tintColor = Color;
4241
vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, vec4(1));
43-
lightColor = minecraft_sample_lightmap(Sampler2, UV2);
44-
overlayColor = texelFetch(Sampler1, UV1, 0);
42+
lightColor = texelFetch(Sampler2, UV2 / 16, 0);
4543
uv = UV0;
46-
normal = ProjMat * ModelViewMat * vec4(Normal, 0.0);
4744

4845
//number of armors from texture size
4946
vec2 size = textureSize(Sampler0, 0);

assets/minecraft/shaders/core/render/glowing.vsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ void main() {
2121
//cannot pass tint color here so it's the only option
2222
vec2 size = textureSize(Sampler0, 0);
2323
if (size.y >= 2*size.x && size.x < 256) {
24-
uv.y /= 2.*size.y/size.x;
24+
uv.y /= 2*size.y/size.x;
2525
}
2626
}

assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.json

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
11
{
2-
"blend": {
3-
"func": "add",
4-
"srcrgb": "srcalpha",
5-
"dstrgb": "1-srcalpha"
6-
},
7-
"vertex": "render/armor",
8-
"fragment": "render/armor",
9-
"attributes": [
10-
"Position",
11-
"Color",
12-
"UV0",
13-
"UV1",
14-
"UV2",
15-
"Normal"
16-
],
2+
"vertex": "minecraft:core/render/armor",
3+
"fragment": "minecraft:core/render/armor",
174
"samplers": [
185
{ "name": "Sampler0" },
19-
{ "name": "Sampler1" },
206
{ "name": "Sampler2" }
217
],
228
"uniforms": [
Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
{
2-
"blend": {
3-
"func": "add",
4-
"srcrgb": "srcalpha",
5-
"dstrgb": "1-srcalpha"
6-
},
7-
"vertex": "render/glowing",
8-
"fragment": "render/glowing",
9-
"attributes": [
10-
"Position",
11-
"Color",
12-
"UV0"
13-
],
2+
"vertex": "minecraft:core/render/glowing",
3+
"fragment": "minecraft:core/render/glowing",
144
"samplers": [
155
{ "name": "Sampler0" }
166
],
@@ -19,4 +9,4 @@
199
{ "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 ] },
2010
{ "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }
2111
]
22-
}
12+
}

assets/minecraft/shaders/include/fog.glsl

Lines changed: 0 additions & 28 deletions
This file was deleted.

assets/minecraft/textures/models/armor/leather_layer_1.png renamed to assets/minecraft/textures/entity/equipment/humanoid/leather.png

File renamed without changes.

assets/minecraft/textures/models/armor/leather_layer_1_overlay.png renamed to assets/minecraft/textures/entity/equipment/humanoid/leather_overlay.png

File renamed without changes.

assets/minecraft/textures/models/armor/leather_layer_2.png renamed to assets/minecraft/textures/entity/equipment/humanoid_leggings/leather.png

File renamed without changes.

0 commit comments

Comments
 (0)