diff --git a/Environment/cloudlayers.xml b/Environment/cloudlayers.xml index d4d9a520b..be85155ef 100644 --- a/Environment/cloudlayers.xml +++ b/Environment/cloudlayers.xml @@ -34,63 +34,80 @@ ns = Nimbostratus (Rain cloud) - 1600 - 4000 - 10 - cl_cumulus.png - 4 - 4 - 0.3 + 2200 + 1200 + 3 + /Models/Weather/congestus_sheet1.rgb + 1 + 3 + 0.2 + 0.3 0.4 - 800 - 800 + 1300 + 600 true - 800 - 800 + 2200 + 1200 + 3 + /Models/Weather/congestus_sheet1.rgb + 1 + 3 + 0.3 + 0.3 + 0.4 + 1300 + 600 + true + + + 900 + 500 10 - cl_cumulus.png + /Models/Weather/cumulus_sheet1.rgb + 3 + 3 + 0.3 + 0.4 + 600 + 900 + 600 + 900 + true + + + 1300 + 700 + 10 + /Textures/Sky/cl_cumulus2.png 4 4 0.3 + 0.6 + 1.0 0.4 - 400 - 400 - true - - - 600 - 1200 - 400 - 800 - 20 - cl_cumulus2.png - 4 - 4 - 0.2 - 0.3 - 400 - 700 - 300 - 700 + 600 + 900 + 600 + 900 true - 600 - 900 - 400 - 600 - 20 - cl_cumulus2.png + 900 + 500 + 10 + /Textures/Sky/cl_cumulus2.png 4 4 - 0.4 + 0.5 + 0.7 + 1.0 0.5 - 300 - 400 - 200 - 300 + 600 + 700 + 500 + 700 true @@ -102,11 +119,13 @@ ns = Nimbostratus (Rain cloud) cl_st.png 1 1 + 0.2 + 0.2 0.2 300 600 - 100 - 200 + 300 + 600 false 0.5 @@ -127,31 +146,44 @@ ns = Nimbostratus (Rain cloud) false 0.5 - - 1000 - 200 - 40 - cl_cumulus.png - 4 - 4 - 0.9 - 400 - 800 - 400 - 800 + + 3500 + 1600 + 4 + /Models/Weather/congestus_sheet1.rgb + 1 + 3 + 0.5 + 1900 + 2100 + 1000 + 1000 false 0.3 + + + 4000 + 4000 + 20 + /Models/Weather/stratus_sheet1.rgb + 3 + 2 + 0.4 + 1500 + 1500 + false + 0.4 - 2000 - 1000 - 40 - cl_st.png - 1 - 1 - 0.9 - 600 - 600 + 5000 + 5000 + 20 + /Models/Weather/stratus_sheet1.rgb + 3 + 2 + 0.4 + 1900 + 1900 false 0.4 @@ -162,7 +194,7 @@ ns = Nimbostratus (Rain cloud) st-small 5 1000 - 200 + 0 1 1 @@ -173,7 +205,7 @@ ns = Nimbostratus (Rain cloud) cu-small 4 800 - 200 + 0 2 2 @@ -181,18 +213,18 @@ ns = Nimbostratus (Rain cloud) - cu-large - 1 + cu-con + 2 1500 - 200 + 0 2 1 cu-small - 4 + 1 1000 - 200 + 0 1 2 @@ -254,8 +286,8 @@ ns = Nimbostratus (Rain cloud) - cu-large - 5 + sc + 1 2500 300 diff --git a/Shaders/3dcloud.vert b/Shaders/3dcloud.vert index 16d26551c..ab724622e 100644 --- a/Shaders/3dcloud.vert +++ b/Shaders/3dcloud.vert @@ -15,9 +15,9 @@ float wScale = usrAttr1.b; float hScale = usrAttr2.r; float shade_factor = usrAttr2.g; float cloud_height = usrAttr2.b; -float bottom_factor = shade_factor; -float middle_factor = 1.0; -float top_factor = 1.0; +float bottom_factor = usrAttr3.r; +float middle_factor = usrAttr3.g; +float top_factor = usrAttr3.b; void main(void) { @@ -55,15 +55,16 @@ void main(void) // Determine the shading of the vertex. We shade it based on it's position // in the cloud relative to the sun, and it's vertical position in the cloud. - float shade = mix(shade_factor, top_factor, smoothstep(-0.3, 0.0, n)); + float shade = mix(shade_factor, top_factor, smoothstep(-0.3, 0.3, n)); //if (n < 0) { // shade = mix(top_factor, shade_factor, abs(n)); //} - float h = gl_Position.z; - shade = min(shade, - min(mix(bottom_factor, middle_factor, smoothstep(0.0, 0.5 * h, h)), - mix(middle_factor, top_factor, smoothstep(0.5 * h, h, h)) ) ); + if (gl_Position.z < 0.5 * cloud_height) { + shade = min(shade, mix(bottom_factor, middle_factor, gl_Position.z * 2.0 / cloud_height)); + } else { + shade = min(shade, mix(middle_factor, top_factor, gl_Position.z * 2.0 / cloud_height - 1.0)); + } //float h = gl_Position.z / cloud_height; //if (h < 0.5) { @@ -78,7 +79,7 @@ void main(void) gl_FrontColor = gl_LightSource[0].diffuse * shade + gl_FrontLightModelProduct.sceneColor; // As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out. - gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(range*0.8, range, fogCoord)); + gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1.0 - smoothstep(range*0.9, range, fogCoord)); gl_BackColor = gl_FrontColor; // Fog doesn't affect clouds as much as other objects. diff --git a/Textures/Sky/cl_cumulus2.png b/Textures/Sky/cl_cumulus2.png index ae66de7e4..eb47a43e8 100644 Binary files a/Textures/Sky/cl_cumulus2.png and b/Textures/Sky/cl_cumulus2.png differ