Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 167 vs 168 for /trunk/assets/shaders/GLSL/sky.glsl

Diff revisions: vs.
  @@ -23,7 +23,8 @@
23 23 void main (void){
24 24
25 25 vec4 sky_color = texture(texSky, _vertex.xyz);
26 -
26 + _skyColor = sky_color;
27 +
27 28 if(enable_sun){
28 29
29 30 vec3 vert = normalize(_vertex);
  @@ -31,18 +32,14 @@
31 32
32 33 float day_factor = max(-sun.y, 0.0);
33 34
34 -
35 35 float dotv = max(dot(vert, -sun), 0.0);
36 36 vec4 sun_color = clamp(gl_LightSource[0].diffuse*1.5, 0.0, 1.0);
37 37
38 38 float pow_factor = day_factor * 175.0 + 25.0;
39 39 float sun_factor = clamp(pow(dotv, pow_factor), 0.0, 1.0);
40 40
41 -
42 - _skyColor = sky_color * day_factor + sun_color * sun_factor;
41 + _skyColor *= day_factor + sun_color * sun_factor;
43 42
44 - }else{
45 - _skyColor = sky_color;
46 43 }
47 44
48 45 _skyColor.a = 1.0;