-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/noxhy/cp2-Pack
- Loading branch information
Showing
12 changed files
with
433 additions
and
24 deletions.
There are no files selected for viewing
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,83 @@ | ||
{ | ||
"credit": "Made with Blockbench", | ||
"texture_size": [64, 64], | ||
"textures": { | ||
"0": "item/knives/animated_knife", | ||
"particle": "item/knives/animated_knife" | ||
}, | ||
"elements": [ | ||
{ | ||
"from": [7.5, 1, 7], | ||
"to": [8.5, 6, 9], | ||
"faces": { | ||
"north": {"uv": [5, 0.25, 5.25, 1.5], "texture": "#0"}, | ||
"east": {"uv": [5.25, 0.25, 5.75, 1.5], "texture": "#0"}, | ||
"south": {"uv": [5.75, 0.25, 6, 1.5], "texture": "#0"}, | ||
"west": {"uv": [6, 0.25, 6.5, 1.5], "texture": "#0"}, | ||
"up": {"uv": [5.75, 0.25, 5.25, 0], "texture": "#0"}, | ||
"down": {"uv": [6.25, 0, 5.75, 0.25], "texture": "#0"} | ||
} | ||
}, | ||
{ | ||
"from": [6.5, 6.01, 6], | ||
"to": [9.5, 6.01, 10], | ||
"faces": { | ||
"north": {"uv": [0.25, 0.25, 1, 0.25], "texture": "#0", "tintindex": 0}, | ||
"east": {"uv": [0.25, 0.25, 1.25, 0.25], "texture": "#0", "tintindex": 0}, | ||
"south": {"uv": [0.25, 0.25, 1, 0.25], "texture": "#0", "tintindex": 0}, | ||
"west": {"uv": [0.25, 0.25, 1.25, 0.25], "texture": "#0", "tintindex": 0}, | ||
"up": {"uv": [3.75, 1.5, 2.5, 0], "texture": "#0", "tintindex": 0}, | ||
"down": {"uv": [5, 1, 3.75, 2.5], "texture": "#0", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"from": [8, 6, 6.5], | ||
"to": [8, 18, 9.5], | ||
"faces": { | ||
"north": {"uv": [0.25, 0.25, 0.25, 3.25], "texture": "#0", "tintindex": 0}, | ||
"east": {"uv": [0, 0, 1.25, 3.5], "texture": "#0", "tintindex": 0}, | ||
"south": {"uv": [0.25, 0.25, 0.25, 3.25], "texture": "#0", "tintindex": 0}, | ||
"west": {"uv": [1.25, 0, 2.5, 3.5], "texture": "#0", "tintindex": 0}, | ||
"up": {"uv": [0.25, 1, 0.25, 0.25], "texture": "#0", "tintindex": 0}, | ||
"down": {"uv": [0.25, 0.25, 0.25, 1], "texture": "#0", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"from": [7, 0, 7], | ||
"to": [9, 1, 9], | ||
"faces": { | ||
"north": {"uv": [5, 2, 5.5, 2.25], "texture": "#0"}, | ||
"east": {"uv": [5.5, 2, 6, 2.25], "texture": "#0"}, | ||
"south": {"uv": [6, 2, 6.5, 2.25], "texture": "#0"}, | ||
"west": {"uv": [6.5, 2, 7, 2.25], "texture": "#0"}, | ||
"up": {"uv": [6, 2, 5.5, 1.5], "texture": "#0"}, | ||
"down": {"uv": [6.5, 1.5, 6, 2], "texture": "#0"} | ||
} | ||
} | ||
], | ||
"gui_light": "front", | ||
"display": { | ||
"thirdperson_righthand": { | ||
"translation": [0, 1.5, 1.25], | ||
"scale": [0.72852, 0.72852, 0.72852] | ||
}, | ||
"thirdperson_lefthand": { | ||
"translation": [0, 1.5, 1.25], | ||
"scale": [0.72852, 0.72852, 0.72852] | ||
}, | ||
"firstperson_righthand": { | ||
"rotation": [-1.59, 21.42, 8.31], | ||
"translation": [1.25, 2.5, 0.25], | ||
"scale": [0.91016, 0.91016, 0.91016] | ||
}, | ||
"firstperson_lefthand": { | ||
"rotation": [-1.59, 21.42, 8.31], | ||
"translation": [1.25, 2.5, 0.25], | ||
"scale": [0.91016, 0.91016, 0.91016] | ||
}, | ||
"gui": { | ||
"rotation": [62.58, -50.47, 88.12], | ||
"translation": [0, -0.5, 0] | ||
} | ||
} | ||
} |
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,83 @@ | ||
{ | ||
"credit": "Made with Blockbench", | ||
"texture_size": [64, 64], | ||
"textures": { | ||
"0": "item/knives/blue_gem_knife", | ||
"particle": "item/knives/blue_gem_knife" | ||
}, | ||
"elements": [ | ||
{ | ||
"from": [7.5, 1, 7], | ||
"to": [8.5, 6, 9], | ||
"faces": { | ||
"north": {"uv": [5, 0.25, 5.25, 1.5], "texture": "#0"}, | ||
"east": {"uv": [5.25, 0.25, 5.75, 1.5], "texture": "#0"}, | ||
"south": {"uv": [5.75, 0.25, 6, 1.5], "texture": "#0"}, | ||
"west": {"uv": [6, 0.25, 6.5, 1.5], "texture": "#0"}, | ||
"up": {"uv": [5.75, 0.25, 5.25, 0], "texture": "#0"}, | ||
"down": {"uv": [6.25, 0, 5.75, 0.25], "texture": "#0"} | ||
} | ||
}, | ||
{ | ||
"from": [6.5, 6.01, 6], | ||
"to": [9.5, 6.01, 10], | ||
"faces": { | ||
"north": {"uv": [0.25, 0.25, 1, 0.25], "texture": "#0", "tintindex": 0}, | ||
"east": {"uv": [0.25, 0.25, 1.25, 0.25], "texture": "#0", "tintindex": 0}, | ||
"south": {"uv": [0.25, 0.25, 1, 0.25], "texture": "#0", "tintindex": 0}, | ||
"west": {"uv": [0.25, 0.25, 1.25, 0.25], "texture": "#0", "tintindex": 0}, | ||
"up": {"uv": [3.75, 1.5, 2.5, 0], "texture": "#0", "tintindex": 0}, | ||
"down": {"uv": [5, 1, 3.75, 2.5], "texture": "#0", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"from": [8, 6, 6.5], | ||
"to": [8, 18, 9.5], | ||
"faces": { | ||
"north": {"uv": [0.25, 0.25, 0.25, 3.25], "texture": "#0", "tintindex": 0}, | ||
"east": {"uv": [0, 0, 1.25, 3.5], "texture": "#0", "tintindex": 0}, | ||
"south": {"uv": [0.25, 0.25, 0.25, 3.25], "texture": "#0", "tintindex": 0}, | ||
"west": {"uv": [1.25, 0, 2.5, 3.5], "texture": "#0", "tintindex": 0}, | ||
"up": {"uv": [0.25, 1, 0.25, 0.25], "texture": "#0", "tintindex": 0}, | ||
"down": {"uv": [0.25, 0.25, 0.25, 1], "texture": "#0", "tintindex": 0} | ||
} | ||
}, | ||
{ | ||
"from": [7, 0, 7], | ||
"to": [9, 1, 9], | ||
"faces": { | ||
"north": {"uv": [5, 2, 5.5, 2.25], "texture": "#0"}, | ||
"east": {"uv": [5.5, 2, 6, 2.25], "texture": "#0"}, | ||
"south": {"uv": [6, 2, 6.5, 2.25], "texture": "#0"}, | ||
"west": {"uv": [6.5, 2, 7, 2.25], "texture": "#0"}, | ||
"up": {"uv": [6, 2, 5.5, 1.5], "texture": "#0"}, | ||
"down": {"uv": [6.5, 1.5, 6, 2], "texture": "#0"} | ||
} | ||
} | ||
], | ||
"gui_light": "front", | ||
"display": { | ||
"thirdperson_righthand": { | ||
"translation": [0, 1.5, 1.25], | ||
"scale": [0.72852, 0.72852, 0.72852] | ||
}, | ||
"thirdperson_lefthand": { | ||
"translation": [0, 1.5, 1.25], | ||
"scale": [0.72852, 0.72852, 0.72852] | ||
}, | ||
"firstperson_righthand": { | ||
"rotation": [-1.59, 21.42, 8.31], | ||
"translation": [1.25, 2.5, 0.25], | ||
"scale": [0.91016, 0.91016, 0.91016] | ||
}, | ||
"firstperson_lefthand": { | ||
"rotation": [-1.59, 21.42, 8.31], | ||
"translation": [1.25, 2.5, 0.25], | ||
"scale": [0.91016, 0.91016, 0.91016] | ||
}, | ||
"gui": { | ||
"rotation": [62.58, -50.47, 88.12], | ||
"translation": [0, -0.5, 0] | ||
} | ||
} | ||
} |
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
67 changes: 67 additions & 0 deletions
67
assets/minecraft/shaders/core/rendertype_entity_translucent_cull.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,67 @@ | ||
#version 150 | ||
|
||
#moj_import <fog.glsl> | ||
|
||
uniform sampler2D Sampler0; | ||
|
||
uniform vec4 ColorModulator; | ||
uniform float FogStart; | ||
uniform float FogEnd; | ||
uniform vec4 FogColor; | ||
|
||
in float vertexDistance; | ||
in vec4 vertexColor; | ||
in vec2 texCoord0; | ||
in vec2 texCoord1; | ||
in vec4 normal; | ||
|
||
in float blueGem; | ||
in float blueGemOffset; | ||
in vec2 pixelSize; | ||
|
||
out vec4 fragColor; | ||
|
||
void main() { | ||
|
||
vec2 coord = texCoord0; | ||
vec4 color = vertexColor; | ||
|
||
vec4 col = texture(Sampler0, texCoord0) * 255.; | ||
if ( blueGem > 0.5 && blueGem < 1.5 && col.b == 69.) { | ||
|
||
vec2 offset = pixelSize; | ||
|
||
offset.y *= (col.r - 128); | ||
offset.x *= (col.g - 128) + blueGemOffset; | ||
|
||
coord += offset; | ||
|
||
color = texture(Sampler0, coord) * ColorModulator; | ||
|
||
} else if ( blueGem > 1.5 && blueGem < 2.5 && col.b == 69.) { | ||
|
||
float transition = mod(blueGemOffset, 1.); | ||
float realOffset = blueGemOffset - transition; | ||
|
||
vec2 offset = pixelSize; | ||
|
||
offset.y *= (col.r - 128); | ||
offset.x *= (col.g - 128) + realOffset; | ||
|
||
coord += offset; | ||
|
||
vec4 c1 = texture(Sampler0, coord) * ColorModulator; | ||
vec4 c2 = texture(Sampler0, coord + vec2(pixelSize.x, 0.)) * ColorModulator; | ||
|
||
color = mix(c1, c2, transition); | ||
|
||
} else { | ||
color *= texture(Sampler0, coord) * ColorModulator; | ||
} | ||
|
||
if (color.a < 0.1) { | ||
discard; | ||
} | ||
fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
assets/minecraft/shaders/core/rendertype_entity_translucent_cull.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,35 @@ | ||
{ | ||
"blend": { | ||
"func": "add", | ||
"srcrgb": "srcalpha", | ||
"dstrgb": "1-srcalpha" | ||
}, | ||
"vertex": "rendertype_entity_translucent_cull", | ||
"fragment": "rendertype_entity_translucent_cull", | ||
"attributes": [ | ||
"Position", | ||
"Color", | ||
"UV0", | ||
"UV1", | ||
"UV2", | ||
"Normal" | ||
], | ||
"samplers": [ | ||
{ "name": "Sampler0" }, | ||
{ "name": "Sampler1" }, | ||
{ "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": "IViewRotMat", "type": "matrix3x3", "count": 9, "values": [ 1.0, 0.0, 0.0, 0.0, 1.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": "Light0_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, | ||
{ "name": "Light1_Direction", "type": "float", "count": 3, "values": [0.0, 0.0, 0.0] }, | ||
{ "name": "FogStart", "type": "float", "count": 1, "values": [ 0.0 ] }, | ||
{ "name": "FogEnd", "type": "float", "count": 1, "values": [ 1.0 ] }, | ||
{ "name": "FogColor", "type": "float", "count": 4, "values": [ 0.0, 0.0, 0.0, 0.0 ] }, | ||
{ "name": "FogShape", "type": "int", "count": 1, "values": [ 0 ] }, | ||
{ "name": "GameTime", "type": "float", "count": 1, "values": [ 0.0 ] } | ||
] | ||
} |
80 changes: 80 additions & 0 deletions
80
assets/minecraft/shaders/core/rendertype_entity_translucent_cull.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,80 @@ | ||
#version 150 | ||
|
||
#moj_import <light.glsl> | ||
#moj_import <fog.glsl> | ||
|
||
in vec3 Position; | ||
in vec4 Color; | ||
in vec2 UV0; | ||
in vec2 UV1; | ||
in ivec2 UV2; | ||
in vec3 Normal; | ||
|
||
uniform sampler2D Sampler2; | ||
uniform sampler2D Sampler0; | ||
|
||
uniform mat4 ModelViewMat; | ||
uniform mat4 ProjMat; | ||
uniform mat3 IViewRotMat; | ||
uniform int FogShape; | ||
uniform float GameTime; | ||
|
||
uniform vec3 Light0_Direction; | ||
uniform vec3 Light1_Direction; | ||
|
||
out float vertexDistance; | ||
out vec4 vertexColor; | ||
out vec2 texCoord0; | ||
out vec2 texCoord1; | ||
out vec2 texCoord2; | ||
out vec4 normal; | ||
|
||
out float blueGem; | ||
out float blueGemOffset; | ||
out vec2 pixelSize; | ||
|
||
float GameTimeSeconds = GameTime * 1200; | ||
|
||
void main() { | ||
gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0); | ||
|
||
vertexDistance = fog_distance(ModelViewMat, IViewRotMat * Position, FogShape); | ||
vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color) * texelFetch(Sampler2, UV2 / 16, 0); | ||
texCoord0 = UV0; | ||
texCoord1 = UV1; | ||
texCoord2 = UV2; | ||
normal = ProjMat * ModelViewMat * vec4(Normal, 0.0); | ||
|
||
int id = gl_VertexID%4; | ||
|
||
blueGem = 0.; | ||
vec4 col = texture(Sampler0, UV0) * 255.; | ||
|
||
if((col.g == 69.) && (col.b == 101. || col.b == 102. || col.b == 103. || col.b == 104.)) { | ||
if (col.a == 254) { | ||
blueGem = 1.; | ||
|
||
pixelSize = vec2(1. / textureSize(Sampler0, 0)); | ||
|
||
vec2 offset = pixelSize; | ||
if (col.b == 103. || col.b == 104.) {offset.x *= -1;} | ||
if (col.b == 102. || col.b == 103.) {offset.y *= -1;} | ||
|
||
texCoord0 += offset; | ||
|
||
blueGemOffset = mod(Color.r * 255., col.r); | ||
} | ||
if (col.a == 253) { | ||
blueGem = 2.; | ||
|
||
pixelSize = vec2(1. / textureSize(Sampler0, 0)); | ||
|
||
vec2 offset = pixelSize; | ||
if (col.b == 103. || col.b == 104.) {offset.x *= -1;} | ||
if (col.b == 102. || col.b == 103.) {offset.y *= -1;} | ||
|
||
texCoord0 += offset; | ||
blueGemOffset = mod(Color.r * 255. + GameTimeSeconds * 10, col.r); | ||
} | ||
} | ||
} |
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.
Oops, something went wrong.