Fixed block preview shader being glitchy. Now shows block without effects.

This commit is contained in:
Christian Knaapen
2021-10-30 16:32:23 +02:00
parent 5b8fafd9f7
commit 80c475ff54
3 changed files with 21 additions and 15 deletions

View File

@@ -27,6 +27,9 @@ in vec4 normal;
out vec4 fragColor;
void main() {
vec4 color2 = texture(Sampler0, texCoord0) * vertexColor * ColorModulator;
fragColor = linear_fog(color2, vertexDistance, FogStart, FogEnd, FogColor);
return;
//convert gametime to seconds (roughly)
float time = GameTime * 1200;

View File

@@ -25,7 +25,7 @@ void main() {
vertexPosition = gl_Position.xyz;
vertexDistance = length((ModelViewMat * vec4(Position + ChunkOffset, 1.0)).xyz);
vertexColor = Color * minecraft_sample_lightmap(Sampler2, UV2);
vertexColor = Color;
texCoord0 = UV0;
normal = ProjMat * ModelViewMat * vec4(Normal, 0.0);
}