Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/atmospheric_engine/shaders/sky.frag @ 3810

Last change on this file since 3810 was 3798, checked in by amaechler, 18 years ago
File size: 520 bytes
RevLine 
[3798]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.