Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/single_player_map/shaders/sky.frag @ 4073

Last change on this file since 4073 was 3939, checked in by bensch, 19 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.