blob: a2c2ecdf6989c2010d4a0ea15c1b852b180dd41d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#version 150
#extension GL_ARB_explicit_attrib_location : enable
#extension GL_ARB_explicit_uniform_location : enable
layout(location = 0) out vec4 frag_color ;
layout(location = 1) uniform vec4 globalAmbient ;
uniform sampler2D texture ;
uniform sampler2D night_tex ;
in vec2 texcoord;
void main() {
frag_color =
mix(texture2D(night_tex,texcoord) * (1-globalAmbient.a),
texture2D(texture,texcoord) * vec4(normalize(globalAmbient.xyz),1),
(globalAmbient.a + 1) / 2) ;
}
|