Item shaders upgrade

This commit is contained in:
paulevsGitch 2021-07-18 19:51:59 +03:00
parent 5c6c4677b0
commit f8b88909cb
2 changed files with 2 additions and 28 deletions

View file

@ -1,28 +0,0 @@
#version 150
#moj_import <fog.glsl>
uniform sampler2D Sampler0;
uniform vec4 ColorModulator;
uniform float FogStart;
uniform float FogEnd;
uniform vec4 FogColor;
in float vertexDistance;
in vec4 vertexColor;
in vec2 texCoord0;
out vec4 fragColor;
void main() {
vec4 tex = texture(Sampler0, texCoord0);
if (tex.a < 0.1) {
discard;
}
vec4 color = tex * ColorModulator;
if (tex.a > 0.99) {
color = color * vertexColor;
}
color.a = 1.0;
fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor);
}

View file

@ -11,6 +11,7 @@ uniform vec4 FogColor;
in float vertexDistance;
in vec4 vertexColor;
in vec2 texCoord0;
in vec4 overlayColor;
out vec4 fragColor;
@ -35,6 +36,7 @@ void main() {
discard;
}
vec4 color = tex * ColorModulator;
color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a);
vec4 vertex = vertexColor;
if (tex.a < 0.99) {
vec3 hsv = rgbToHSV(vertex.rgb);