Skip to content

Commit 4777d41

Browse files
committed
Refactor rendertype_lines shaders
1 parent 8dffb89 commit 4777d41

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed

src/main/resources/assets/vulkanmod/shaders/minecraft/core/rendertype_lines/rendertype_lines.fsh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,4 @@ void main() {
2626
fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor);
2727
}
2828

29-
/*
30-
#version 150
31-
32-
#moj_import <fog.glsl>
33-
34-
uniform vec4 ColorModulator;
35-
uniform float FogStart;
36-
uniform float FogEnd;
37-
uniform vec4 FogColor;
38-
39-
in float vertexDistance;
40-
in vec4 vertexColor;
41-
42-
out vec4 fragColor;
43-
*/
4429

src/main/resources/assets/vulkanmod/shaders/minecraft/core/rendertype_lines/rendertype_lines.vsh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ void main() {
3636
lineOffset *= -1.0;
3737
}
3838

39-
int div = (gl_VertexIndex / 2);
40-
if (gl_VertexIndex - div * 2 == 0) {
39+
if (mod(gl_VertexIndex, 2) == 0) {
4140
gl_Position = vec4((ndc1 + vec3(lineOffset, 0.0)) * linePosStart.w, linePosStart.w);
4241
} else {
4342
gl_Position = vec4((ndc1 - vec3(lineOffset, 0.0)) * linePosStart.w, linePosStart.w);
@@ -47,18 +46,3 @@ void main() {
4746
vertexColor = Color;
4847
}
4948

50-
// #version 150
51-
//
52-
// in vec3 Position;
53-
// in vec4 Color;
54-
// in vec3 Normal;
55-
//
56-
// uniform mat4 ModelViewMat;
57-
// uniform mat4 ProjMat;
58-
// uniform float LineWidth;
59-
// uniform vec2 ScreenSize;
60-
//
61-
// out float vertexDistance;
62-
// out vec4 vertexColor;
63-
64-

0 commit comments

Comments
 (0)