aboutsummaryrefslogtreecommitdiff
path: root/shaders/forest.frag
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/forest.frag')
-rw-r--r--shaders/forest.frag3
1 files changed, 2 insertions, 1 deletions
diff --git a/shaders/forest.frag b/shaders/forest.frag
index 7392a00..f2d7643 100644
--- a/shaders/forest.frag
+++ b/shaders/forest.frag
@@ -16,6 +16,7 @@ uniform float dY ;
in vec2 texposition ;
in vec3 normal ;
in vec4 frag_position ;
+in float shade ;
vec4 sample(float xc,float yc) {
return texture2D(texture,texposition + vec2(xc,yc));
@@ -49,5 +50,5 @@ void main() {
vec4 col = texture2D(texture,texposition) ;
float coef = max(dot( normalize(newNorm),
normalize(vec3(frag_position - light)) ),0) + (globalAmbient.a/4.0) ;
- frag_color = vec4( col.xyz * coef * globalAmbient.xyz, col.a);
+ frag_color = vec4( shade * col.xyz * coef * globalAmbient.xyz, col.a);
}