|
@@ -10,7 +10,10 @@ in vec3 varNormalG;
|
|
|
|
|
|
out vec4 color;
|
|
|
|
|
|
+const vec3 light = vec3(-0.746, -0.373, -0.224);
|
|
|
+
|
|
|
void main(void) {
|
|
|
- //vec3 f = texture(textureSamp, (varTextureG + vec3(0.0, height, 0.0)) * 8.0).xyz;
|
|
|
- color = vec4(varNormalG, 1.0);
|
|
|
+ vec3 f = texture(textureSamp, (varTextureG + vec3(0.0, height, 0.0)) * 8.0).xyz;
|
|
|
+ float l = max(dot(light, varNormalG), 0.0) * 0.7 + 0.3;
|
|
|
+ color = vec4(f * l, 1.0);
|
|
|
}
|