-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RP | Mojang broke the sharders - FIXIN!
- Loading branch information
Showing
45 changed files
with
5,402 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
sharders/assets/minecraft/shaders/core/rendertype_text.fsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
28
sharders/assets/minecraft/shaders/core/rendertype_text.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
45
sharders/assets/minecraft/shaders/core/rendertype_text.vsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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.
Binary file modified
BIN
-61 Bytes
(74%)
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
BIN
-57 Bytes
(68%)
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
BIN
-73 Bytes
(68%)
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
BIN
-94 Bytes
(69%)
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
BIN
-53 Bytes
(70%)
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.
Binary file added
BIN
+957 Bytes
sharders/assets/nameplates/textures/font/nameplates/cheems_middle.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.
Binary file added
BIN
+1.02 KB
sharders/assets/nameplates/textures/font/nameplates/halloween_left.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 added
BIN
+971 Bytes
sharders/assets/nameplates/textures/font/nameplates/halloween_middle.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 added
BIN
+1.02 KB
sharders/assets/nameplates/textures/font/nameplates/halloween_right.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.
Binary file added
BIN
+177 Bytes
sharders/assets/nameplates/textures/font/nameplates/hutao_middle.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 added
BIN
+449 Bytes
sharders/assets/nameplates/textures/font/nameplates/hutao_right.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 added
BIN
+975 Bytes
sharders/assets/nameplates/textures/font/nameplates/rabbit_left.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 added
BIN
+914 Bytes
sharders/assets/nameplates/textures/font/nameplates/rabbit_middle.png
Oops, something went wrong.
Binary file added
BIN
+975 Bytes
sharders/assets/nameplates/textures/font/nameplates/rabbit_right.png
Oops, something went wrong.
Binary file added
BIN
+1017 Bytes
sharders/assets/nameplates/textures/font/nameplates/starsky_left.png
Oops, something went wrong.
Binary file added
BIN
+1010 Bytes
sharders/assets/nameplates/textures/font/nameplates/starsky_middle.png
Oops, something went wrong.
Binary file added
BIN
+1008 Bytes
sharders/assets/nameplates/textures/font/nameplates/starsky_right.png
Oops, something went wrong.
Binary file added
BIN
+205 Bytes
sharders/assets/nameplates/textures/font/nameplates/trident_left.png
Oops, something went wrong.
Binary file added
BIN
+165 Bytes
sharders/assets/nameplates/textures/font/nameplates/trident_middle.png
Oops, something went wrong.
Binary file added
BIN
+173 Bytes
sharders/assets/nameplates/textures/font/nameplates/trident_right.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+928 Bytes
sharders/assets/nameplates/textures/font/nameplates/wither_middle.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+959 Bytes
sharders/assets/nameplates/textures/font/nameplates/xmas_middle.png
Oops, something went wrong.
Oops, something went wrong.