Changeset 3876 for data/branches/atmospheric_engine/shaders/cloud.frag
- Timestamp:
- Jun 22, 2006, 4:09:40 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/atmospheric_engine/shaders/cloud.frag
r3875 r3876 1 // 1 2 // Fragment shader for producing animated clouds (mostly cloudy) 3 // 4 // Author: Randi Rost 5 // 6 // Copyright (c) 2002-2004 3Dlabs Inc. Ltd. 7 // 8 // See 3Dlabs-License.txt for license information 9 // 2 10 3 11 varying float LightIntensity; … … 11 19 void main (void) 12 20 { 13 21 vec4 noisevec = texture3D(Noise, MCposition + Offset); 14 22 15 16 23 float intensity = (noisevec[0] + noisevec[1] + 24 noisevec[2] + noisevec[3]) * 1.5; 17 25 18 26 vec3 color = mix(SkyColor, CloudColor, intensity) * LightIntensity; 19 27 20 28 gl_FragColor = vec4 (color, 1.0); 21 29 }
Note: See TracChangeset
for help on using the changeset viewer.