Skip to content

Commit

Permalink
RP | Mojang broke the sharders - FIXIN!
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik0-0 committed Aug 31, 2024
1 parent b0165f7 commit cdf1382
Show file tree
Hide file tree
Showing 45 changed files with 5,402 additions and 1 deletion.
31 changes: 31 additions & 0 deletions sharders/assets/minecraft/shaders/core/rendertype_text.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#version 150
#moj_import<fog.glsl>

uniform sampler2D Sampler0;
uniform vec4 ColorModulator;
uniform float FogStart,FogEnd;
uniform vec4 FogColor;
uniform float GameTime;

in float vertexDistance;
in vec4 vertexColor;
in vec2 texCoord0;
in float depthLevel;

out vec4 fragColor;

void main() {
vec4 texColor = texture(Sampler0, texCoord0);
vec4 color = texColor * vertexColor * ColorModulator;
if (color.a < 0.1) {
discard;
}
if (texColor.a == 254.0/255.0) {
if (depthLevel == 1000.00) {
discard;
} else {
color = vec4(texColor.rgb, 1.0) * vertexColor * ColorModulator;
}
}
fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor);
}
28 changes: 28 additions & 0 deletions sharders/assets/minecraft/shaders/core/rendertype_text.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"blend": {
"func": "add",
"srcrgb": "srcalpha",
"dstrgb": "1-srcalpha"
},
"vertex": "rendertype_text",
"fragment": "rendertype_text",
"attributes": [
"Position",
"Color",
"UV0",
"UV2"
],
"samplers": [
{ "name": "Sampler0" },
{ "name": "Sampler2" }
],
"uniforms": [
{ "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 ] },
{ "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 ] },
{ "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] },
{ "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] },
{ "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] },
{ "name": "GameTime", "type": "float", "count": 1, "values": [ 1.0 ] },
{ "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }
]
}
45 changes: 45 additions & 0 deletions sharders/assets/minecraft/shaders/core/rendertype_text.vsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#version 150
#moj_import <fog.glsl>

in vec3 Position;
in vec4 Color;
in vec2 UV0;
in ivec2 UV2;

uniform sampler2D Sampler2;
uniform mat4 ModelViewMat;
uniform mat4 ProjMat;
uniform float GameTime;
uniform int FogShape;
uniform vec2 ScreenSize;

out float vertexDistance;
out vec4 vertexColor;
out vec2 texCoord0;
out float depthLevel;

void main() {
vec4 vertex = vec4(Position, 1.0);
vertexDistance = fog_distance(Position, FogShape);
depthLevel = Position.z;
texCoord0 = UV0;
if (Color.xyz == vec3(255., 254., 253.) / 255.) {
vertexColor = Color*texelFetch(Sampler2, UV2 / 16, 0);
vertex.y += 1;
vertex.x += 1;
gl_Position = ProjMat * ModelViewMat * vertex;
} else if (Color.xyz == vec3(254., 254., 254.) / 255.) {
vertexColor = Color*texelFetch(Sampler2, UV2 / 16, 0);
vertex.z *= 1.001;
vertex.x *= 1.001;
gl_Position = ProjMat * ModelViewMat * vertex;
} else if (Color.xyz == vec3(253., 254., 254.) / 255.) {
vertexColor = Color*texelFetch(Sampler2, UV2 / 16, 0);
vertex.z *= 1.001001;
vertex.x *= 1.001001;
gl_Position = ProjMat * ModelViewMat * vertex;
} else {
vertexColor = Color*texelFetch(Sampler2, UV2 / 16, 0);
gl_Position = ProjMat * ModelViewMat * vertex;
}
}
191 changes: 191 additions & 0 deletions sharders/assets/nameplates/font/ascent_-15.json

Large diffs are not rendered by default.

5,106 changes: 5,106 additions & 0 deletions sharders/assets/nameplates/font/ascent_3.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sharders/assets/nameplates/font/default.json

Large diffs are not rendered by default.

Binary file modified sharders/assets/nameplates/textures/font/images/bell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sharders/assets/nameplates/textures/font/images/bubble.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sharders/assets/nameplates/textures/font/images/clock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sharders/assets/nameplates/textures/font/images/coin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sharders/assets/nameplates/textures/font/images/compass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sharders/assets/nameplates/textures/font/images/stamina_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sharders/assets/nameplates/textures/font/images/stamina_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sharders/assets/nameplates/textures/font/images/stamina_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sharders/assets/nameplates/textures/font/images/weather.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cdf1382

Please sign in to comment.