Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/trunk/shaders/sky.frag @ 3989

Last change on this file since 3989 was 3939, checked in by bensch, 18 years ago

data/trunk: merged the data from the atmos branche back

File size: 520 bytes
Line 
1varying float intensity_sq, intensity;
2
3uniform sampler2D s_texture_0;
4uniform sampler2D s_texture_1;
5
6uniform vec4 horizon;
7
8void main()
9{
10   vec4 clouds_0 = texture2D(s_texture_0, gl_TexCoord[0].xy);
11   vec4 clouds_1 = texture2D(s_texture_1, gl_TexCoord[1].xy);
12       
13   vec4 clouds = (clouds_0 + clouds_1) * intensity_sq;
14
15   vec4 cloud_color = vec4((1.0 - intensity) * horizon.x, (1.0 - intensity) * horizon.y, intensity * horizon.z, 0.0);
16
17   gl_FragColor = cloud_color * (1.0 - clouds.x) + clouds;
18}
Note: See TracBrowser for help on using the repository browser.