Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit 0a0d9fd

Browse files
committed
2 parents 9d47b34 + b9eba27 commit 0a0d9fd

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#version 150
2+
3+
#define DISCARD_THRESHOLD 0.1

assets/minecraft/shaders/include/render/block.fsh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#version 150
22

33
#moj_import <fog.glsl>
4+
#moj_import <config.glsl>
45

56
uniform sampler2D Sampler0;
67

@@ -19,8 +20,8 @@ out vec4 fragColor;
1920

2021
void main() {
2122
vec4 color = texture(Sampler0, texCoord0);
22-
#ifdef CUTOUT
23-
if (color.a < 0.01) discard;
23+
#ifdef DISCARD
24+
if (color.a < DISCARD_THRESHOLD) discard;
2425
#endif
2526
color *= vertexColor * lightColor * ColorModulator;
2627
fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor);

assets/minecraft/shaders/include/render/entity.fsh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#version 150
22

33
#moj_import <fog.glsl>
4+
#moj_import <config.glsl>
45

56
uniform sampler2D Sampler0;
67

@@ -21,8 +22,8 @@ out vec4 fragColor;
2122

2223
void main() {
2324
vec4 color = texture(Sampler0, texCoord0);
24-
#ifdef CUTOUT
25-
if (color.a < 0.01) discard;
25+
#ifdef DISCARD
26+
if (color.a < DISCARD_THRESHOLD) discard;
2627
#endif
2728
color *= vertexColor * ColorModulator;
2829
#ifdef OVERLAY

0 commit comments

Comments
 (0)