varying float LightIntensity; varying vec3 MCposition; varying vec3 ECposition; uniform vec4 SkyColor; uniform vec4 CloudColor; uniform float Bias; uniform sampler3D Noise3; void main() { vec4 noisevec = texture3D( Noise3, MCposition ); float intensity = ( noisevec[0] + noisevec[1] + noisevec[2] + noisevec[3] ); vec3 color = mix( SkyColor.rgb, CloudColor.rgb, clamp( Bias+intensity, 0., 1. ) ) * LightIntensity; if( ECposition.y >= 0. ) gl_FragColor = vec4(color, 1.0); else gl_FragColor = vec4( 0., 0., 0., 1. ); }