vox/assets/shade.frag

18 lines
300 B
GLSL
Raw Normal View History

#version 140
in vec2 v_tex_coords;
2022-03-29 05:58:46 -05:00
in vec3 v_frag_color;
in float v_sun_intensity;
out vec4 color;
2022-03-29 05:58:46 -05:00
uniform sampler2D tex;
void main() {
2022-03-29 05:58:46 -05:00
vec4 sun_color = vec4(v_sun_intensity , v_sun_intensity , 0.0, 1.0);
color = texture(tex, v_tex_coords) * vec4(v_frag_color, 1.0) * sun_color;
}