Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit 4a7fb18

Browse files
committed
update to 1.21
1 parent 4e8a8d6 commit 4a7fb18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+34
-175
lines changed

assets/minecraft/shaders/core/position_color.vsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ out float fogDistance;
1414

1515
void main() {
1616
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
17-
fogDistance = fog_distance(ModelViewMat, Position, FogShape);
17+
fogDistance = fog_distance(Position, FogShape);
1818
vertexColor = Color;
1919
}

assets/minecraft/shaders/core/position_tex.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"uniforms": [
1717
{ "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 ] },
1818
{ "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 ] },
19-
{ "name": "IViewRotMat", "type": "matrix3x3", "count": 9, "values": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] },
2019
{ "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] },
2120
{ "name": "ScreenSize", "type": "float", "count": 2, "values": [ 1.0, 1.0 ] },
2221
{ "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] },

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ uniform sampler2D Sampler2;
1414

1515
uniform mat4 ModelViewMat;
1616
uniform mat4 ProjMat;
17-
uniform mat3 IViewRotMat;
1817
uniform int FogShape;
1918

2019
uniform vec3 Light0_Direction;
@@ -29,7 +28,7 @@ out vec4 glpos;
2928
void main() {
3029
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
3130
glpos = gl_Position;
32-
fogDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape);
31+
fogDistance = fog_distance(Position, FogShape);
3332
vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color);
3433
lightColor = getlight(Sampler2, UV2);
3534
texCoord0 = UV0;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void main() {
2727
gl_Position = ProjMat * ModelViewMat * vec4(pos, 1.0);
2828

2929
texCoord0 = UV0;
30-
fogDistance = fog_distance(ModelViewMat, pos, FogShape);
30+
fogDistance = fog_distance(pos, FogShape);
3131

3232
// try the flatten the cloud shading as much as possible
3333
vec4 col = Color;

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ uniform sampler2D Sampler0;
1010

1111
uniform mat4 ModelViewMat;
1212
uniform mat4 ProjMat;
13-
uniform mat3 IViewRotMat;
1413

1514
out vec4 vertexColor;
1615
out vec2 texCoord0;
@@ -29,15 +28,15 @@ void main() {
2928
vertexColor = Color;
3029
texCoord0 = UV0;
3130

32-
rNormal = normalize(IViewRotMat * Normal);
31+
rNormal = normalize(Normal);
3332

3433
vec3 xVec, yVec;
3534
if (abs(rNormal.y) >= 0.9) {
36-
yVec = vec3(0, 0, -1) * IViewRotMat;
37-
xVec = vec3(1, 0, 0) * IViewRotMat;
35+
yVec = mat3(ModelViewMat) * vec3(0, 0, -1);
36+
xVec = mat3(ModelViewMat) * vec3(1, 0, 0);
3837
}
3938
else {
40-
yVec = vec3(0, 1, 0) * IViewRotMat;
39+
yVec = mat3(ModelViewMat) * vec3(0, 1, 0);
4140
xVec = cross(Normal, yVec);
4241
}
4342

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ uniform sampler2D Sampler2;
1515

1616
uniform mat4 ModelViewMat;
1717
uniform mat4 ProjMat;
18-
uniform mat3 IViewRotMat;
1918
uniform int FogShape;
2019

2120
uniform vec3 Light0_Direction;
@@ -31,7 +30,7 @@ out vec4 glpos;
3130
void main() {
3231
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
3332
glpos = gl_Position;
34-
fogDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape);
33+
fogDistance = fog_distance(Position, FogShape);
3534
vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color);
3635
lightColor = getlight(Sampler2, UV2);
3736
overlayColor = texelFetch(Sampler1, UV1, 0);

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ in vec3 Position;
77

88
uniform mat4 ModelViewMat;
99
uniform mat4 ProjMat;
10-
uniform mat3 IViewRotMat;
1110
uniform int FogShape;
1211

1312
out float fogDistance;
@@ -17,6 +16,6 @@ out vec4 glpos;
1716
void main() {
1817
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
1918
glpos = gl_Position;
20-
fogDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape);
19+
fogDistance = fog_distance(Position, FogShape);
2120
texProj0 = projection_from_position(gl_Position);
2221
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void main() {
2020
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
2121
glpos = gl_Position;
2222

23-
fogDistance = fog_distance(ModelViewMat, Position, FogShape);
23+
fogDistance = fog_distance(Position, FogShape);
2424
vertexColor = Color;
2525
texCoord0 = (TextureMat * vec4(UV0, 0.0, 1.0)).xy;
2626
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ in vec2 UV0;
88

99
uniform mat4 ModelViewMat;
1010
uniform mat4 ProjMat;
11-
uniform mat3 IViewRotMat;
1211
uniform int FogShape;
1312

1413
out float fogDistance;
@@ -19,7 +18,7 @@ out vec4 glpos;
1918
void main() {
2019
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
2120
glpos = gl_Position;
22-
fogDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape);
21+
fogDistance = fog_distance(Position, FogShape);
2322
vertexColor = Color;
2423
texCoord0 = UV0;
2524
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ out vec4 glpos;
1717
void main() {
1818
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);
1919
glpos = gl_Position;
20-
fogDistance = fog_distance(ModelViewMat, Position, FogShape);
20+
fogDistance = fog_distance(Position, FogShape);
2121
texCoord0 = (TextureMat * vec4(UV0, 0.0, 1.0)).xy;
2222
}

0 commit comments

Comments
 (0)