Skip to content

Commit

Permalink
1.19.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkKronicle committed Jan 20, 2023
1 parent 1aa0c83 commit 8ea4309
Show file tree
Hide file tree
Showing 11 changed files with 213 additions and 109 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +0,0 @@
#version 150

in vec4 vertexColor;

out vec4 fragColor;
uniform float GameTime;

void main() {
vec4 color = vertexColor;
if (color.a == 0.0) {
discard;
}
fragColor = color;
}
Original file line number Diff line number Diff line change
@@ -1,47 +0,0 @@
#version 150

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

uniform mat4 ModelViewMat;
uniform mat4 ProjMat;
uniform float GameTime;
uniform vec4 ColorModulator;

out vec4 vertexColor;

void main() {
vec4 vertex = vec4(Position, 1.0);

gl_Position = ProjMat * ModelViewMat * vertex;
float dist = gl_Position.x + gl_Position.y;
float size = 50 * (1 - ColorModulator[0]);
float speed = 5000 * ColorModulator[1];
float saturation = ColorModulator[2];

if (size <= 0) {
// Solid color
dist = 0;
}

dist = dist * size;

vec4 colorInbetween = (
(.6 + .6 * cos((dist + GameTime * speed) + vec4(0, 23, 21, 0)))
);

if (saturation < 1) {
float gray = colorInbetween[0] * 0.299 + colorInbetween[1] * 0.587 + colorInbetween[2] * 0.114;
if (saturation > 0) {
colorInbetween[0] = (gray * (1 - saturation)) + (colorInbetween[0] * saturation);
colorInbetween[1] = (gray * (1 - saturation)) + (colorInbetween[1] * saturation);
colorInbetween[2] = (gray * (1 - saturation)) + (colorInbetween[2] * saturation);
} else {
colorInbetween = vec4(gray, gray, gray, 1);
}
}
colorInbetween[3] = ColorModulator[3];
vertexColor = colorInbetween;
}
Original file line number Diff line number Diff line change
@@ -1,26 +0,0 @@
#version 150

in vec4 vertexColor;
in vec2 texCoord0;
in float innerRad;

out vec4 fragColor;

void main() {
vec4 color = vertexColor;
float x = (texCoord0.x - .5) * 2;
float y = (texCoord0.y - .5) * 2;
float calc = x * x + y * y;

if (calc > 1 || calc < innerRad) {
discard;
}

float d = length(vec2(x, y));
float wd = d * .02; // <=> float wd = fwidth(d);
float circle = smoothstep(1 + wd, 1 - wd, d);
if (circle > .99 && innerRad > 0 && d - innerRad < .3) {
circle = smoothstep(1 - .3, 1, d / innerRad);
}
fragColor = vec4(vertexColor.rgb, vertexColor.a * circle);
}
Original file line number Diff line number Diff line change
@@ -1,21 +0,0 @@
#version 150

in vec3 Position;
in vec4 UV0;
in vec4 Color;

uniform mat4 ModelViewMat;
uniform mat4 ProjMat;
uniform vec4 ColorModulator;

out vec4 vertexColor;
out vec2 texCoord0;
out float innerRad;

void main() {
vec4 vertex = vec4(Position, 1.0);
gl_Position = ProjMat * ModelViewMat * vertex;
innerRad = ColorModulator[0];
vertexColor = UV0;
texCoord0 = Color.xy;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#version 150

in vec4 vertexColor;

out vec4 fragColor;
uniform float GameTime;

void main() {
vec4 color = vertexColor;
if (color.a == 0.0) {
discard;
}
fragColor = color;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"blend": {
"func": "add",
"srcrgb": "srcalpha",
"dstrgb": "1-srcalpha"
},
"vertex": "darkkore_chroma",
"fragment": "darkkore_chroma",
"attributes": [
"Position",
"Color",
"UV0",
"UV2"
],
"samplers": [
],
"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": "GameTime",
"type": "float",
"count": 1,
"values": [
0
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#version 150

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

uniform mat4 ModelViewMat;
uniform mat4 ProjMat;
uniform float GameTime;
uniform vec4 ColorModulator;

out vec4 vertexColor;

void main() {
vec4 vertex = vec4(Position, 1.0);

gl_Position = ProjMat * ModelViewMat * vertex;
float dist = gl_Position.x + gl_Position.y;
float size = 50 * (1 - ColorModulator[0]);
float speed = 5000 * ColorModulator[1];
float saturation = ColorModulator[2];

if (size <= 0) {
// Solid color
dist = 0;
}

dist = dist * size;

vec4 colorInbetween = (
(.6 + .6 * cos((dist + GameTime * speed) + vec4(0, 23, 21, 0)))
);

if (saturation < 1) {
float gray = colorInbetween[0] * 0.299 + colorInbetween[1] * 0.587 + colorInbetween[2] * 0.114;
if (saturation > 0) {
colorInbetween[0] = (gray * (1 - saturation)) + (colorInbetween[0] * saturation);
colorInbetween[1] = (gray * (1 - saturation)) + (colorInbetween[1] * saturation);
colorInbetween[2] = (gray * (1 - saturation)) + (colorInbetween[2] * saturation);
} else {
colorInbetween = vec4(gray, gray, gray, 1);
}
}
colorInbetween[3] = ColorModulator[3];
vertexColor = colorInbetween;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#version 150

in vec4 vertexColor;
in vec2 texCoord0;
in float innerRad;

out vec4 fragColor;

void main() {
vec4 color = vertexColor;
float x = (texCoord0.x - .5) * 2;
float y = (texCoord0.y - .5) * 2;
float calc = x * x + y * y;

if (calc > 1 || calc < innerRad) {
discard;
}

float d = length(vec2(x, y));
float wd = d * .02; // <=> float wd = fwidth(d);
float circle = smoothstep(1 + wd, 1 - wd, d);
if (circle > .99 && innerRad > 0 && d - innerRad < .3) {
circle = smoothstep(1 - .3, 1, d / innerRad);
}
fragColor = vec4(vertexColor.rgb, vertexColor.a * circle);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"blend": {
"func": "add",
"srcrgb": "srcalpha",
"dstrgb": "1-srcalpha"
},
"vertex": "darkkore_circle",
"fragment": "darkkore_circle",
"attributes": [
"Position",
"UV0",
"Color"
],
"samplers": [
],
"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
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#version 150

in vec3 Position;
in vec4 UV0;
in vec4 Color;

uniform mat4 ModelViewMat;
uniform mat4 ProjMat;
uniform vec4 ColorModulator;

out vec4 vertexColor;
out vec2 texCoord0;
out float innerRad;

void main() {
vec4 vertex = vec4(Position, 1.0);
gl_Position = ProjMat * ModelViewMat * vertex;
innerRad = ColorModulator[0];
vertexColor = UV0;
texCoord0 = Color.xy;
}
1 change: 0 additions & 1 deletion src/main/resources/darkkore.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"client": [
"MixinClickableWidget",
"MixinClientPlayNetworkHandler",
"MixinGameRenderer",
"MixinKeyboard",
"MixinMinecraftClient",
"MixinMouse"
Expand Down

0 comments on commit 8ea4309

Please sign in to comment.