Skip to content

Commit 38ec8ed

Browse files
committed
make glow gowier
1 parent 26d8b76 commit 38ec8ed

File tree

3 files changed

+24
-73
lines changed

3 files changed

+24
-73
lines changed

overlay_1.21.6/assets/minecraft/shaders/core/entity.fsh

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,38 @@ in vec2 texCoord0;
1414

1515
out vec4 fragColor;
1616

17+
// Customizable glow parameters
18+
const float GLOW_THRESHOLD = 0.3;
19+
const float GLOW_INTENSITY = 0.8;
20+
const float GLOW_BOOST = 0.6;
21+
1722
void main() {
18-
vec2 texSize = textureSize(Sampler0, 0);
23+
vec2 texSize = textureSize(Sampler0, 0);
1924
vec4 color = texture(Sampler0, texCoord0);
25+
2026
#ifdef ALPHA_CUTOUT
2127
if (color.a < ALPHA_CUTOUT) {
2228
discard;
2329
}
2430
#endif
25-
vec4 NewoverlayColor = overlayColor;
26-
if(dot(overlayColor.rgb - vec3(1,0,0),overlayColor.rgb - vec3(1,0,0)) <= 0.00001){
27-
NewoverlayColor = vec4(163.0/255.0,1.0/255.0,160.0/255.0,1.0);
28-
}
31+
2932
color *= vertexColor * ColorModulator;
33+
3034
#ifndef NO_OVERLAY
31-
color.rgb = mix(NewoverlayColor.rgb, color.rgb, overlayColor.a);
32-
#endif
33-
#ifndef EMISSIVE
34-
if (texSize.x == 2048 && mod(texSize.y, 1024) == 0) {
35-
} else {
36-
color *= lightMapColor;
37-
}
35+
color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a);
3836
#endif
37+
if (texSize.x == 2048 && mod(texSize.y, 1024) == 0) {
38+
float brightness = dot(color.rgb, vec3(0.299, 0.587, 0.114));
39+
float glowFactor = smoothstep(GLOW_THRESHOLD, 0.8, brightness);
40+
41+
vec3 glow = color.rgb * GLOW_INTENSITY * glowFactor;
42+
color.rgb += glow;
43+
44+
color.rgb *= (1.0 + GLOW_BOOST * glowFactor);
45+
color.rgb = min(color.rgb, vec3(2.0));
46+
} else {
47+
color *= lightMapColor;
48+
}
49+
3950
fragColor = apply_fog(color, sphericalVertexDistance, cylindricalVertexDistance, FogEnvironmentalStart, FogEnvironmentalEnd, FogRenderDistanceStart, FogRenderDistanceEnd, FogColor);
40-
}
51+
}

overlay_1.21.6/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.fsh

Lines changed: 0 additions & 30 deletions
This file was deleted.

overlay_1.21.6/assets/minecraft/shaders/core/rendertype_entity_solid.fsh

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)