mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-22 09:38:52 +08:00
Revert "add scale setting for large/small cumulus clouds"
This reverts commit fbee3f8426
.
This commit is contained in:
parent
855b08cd12
commit
bf92f66129
@ -371,14 +371,12 @@ uniform int moonPhase;
|
|||||||
#define CloudLayer0_density 0.5 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.00]
|
#define CloudLayer0_density 0.5 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.00]
|
||||||
#define CloudLayer0_height 250 // [-300 -290 -280 -270 -260 -250 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000 1250 1500 1750 2000 2250 2500 2750 3000 4000 5000]
|
#define CloudLayer0_height 250 // [-300 -290 -280 -270 -260 -250 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000 1250 1500 1750 2000 2250 2500 2750 3000 4000 5000]
|
||||||
#define CloudLayer0_tallness 100 // // [0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000 1250 1500 1750 2000 2250 2500 2750 3000 4000 5000]
|
#define CloudLayer0_tallness 100 // // [0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000 1250 1500 1750 2000 2250 2500 2750 3000 4000 5000]
|
||||||
#define CloudLayer0_scale 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
|
||||||
|
|
||||||
#define CloudLayer1
|
#define CloudLayer1
|
||||||
#define CloudLayer1_coverage 0.7 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
#define CloudLayer1_coverage 0.7 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
||||||
#define CloudLayer1_density 0.5 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.00]
|
#define CloudLayer1_density 0.5 // [0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1.00]
|
||||||
#define CloudLayer1_height 500 // [-300 -290 -280 -270 -260 -250 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000 1250 1500 1750 2000 2250 2500 2750 3000 4000 5000]
|
#define CloudLayer1_height 500 // [-300 -290 -280 -270 -260 -250 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000 1250 1500 1750 2000 2250 2500 2750 3000 4000 5000]
|
||||||
#define CloudLayer1_tallness 200 // // [0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000 1250 1500 1750 2000 2250 2500 2750 3000 4000 5000]
|
#define CloudLayer1_tallness 200 // // [0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 700 800 900 1000 1250 1500 1750 2000 2250 2500 2750 3000 4000 5000]
|
||||||
#define CloudLayer1_scale 1.0 // [0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0]
|
|
||||||
|
|
||||||
|
|
||||||
#define CloudLayer2
|
#define CloudLayer2
|
||||||
|
@ -47,8 +47,8 @@ float getCloudShape(int LayerIndex, int LOD, in vec3 position, float minHeight,
|
|||||||
if(LayerIndex == LARGECUMULUS_LAYER){
|
if(LayerIndex == LARGECUMULUS_LAYER){
|
||||||
coverage = dailyWeatherParams0.y;
|
coverage = dailyWeatherParams0.y;
|
||||||
|
|
||||||
largeCloud = texture2D(noisetex, (samplePos.zx + cloud_movement*2.0)/10000.0 * CloudLayer1_scale).b;
|
largeCloud = texture2D(noisetex, (samplePos.zx + cloud_movement*2.0)/10000.0).b;
|
||||||
smallCloud = texture2D(noisetex, (samplePos.zx - cloud_movement*2.0)/2500.0 * CloudLayer1_scale).b;
|
smallCloud = texture2D(noisetex, (samplePos.zx - cloud_movement*2.0)/2500.0).b;
|
||||||
|
|
||||||
smallCloud = abs(largeCloud* -0.7) + smallCloud;
|
smallCloud = abs(largeCloud* -0.7) + smallCloud;
|
||||||
|
|
||||||
@ -60,8 +60,8 @@ float getCloudShape(int LayerIndex, int LOD, in vec3 position, float minHeight,
|
|||||||
if(LayerIndex == SMALLCUMULUS_LAYER){
|
if(LayerIndex == SMALLCUMULUS_LAYER){
|
||||||
coverage = dailyWeatherParams0.x;
|
coverage = dailyWeatherParams0.x;
|
||||||
|
|
||||||
largeCloud = texture2D(noisetex, (samplePos.xz + cloud_movement)/5000.0 * CloudLayer0_scale).b;
|
largeCloud = texture2D(noisetex, (samplePos.xz + cloud_movement)/5000.0).b;
|
||||||
smallCloud = 1.0-texture2D(noisetex, (samplePos.xz - cloud_movement)/500.0 * CloudLayer0_scale).r;
|
smallCloud = 1.0-texture2D(noisetex, (samplePos.xz - cloud_movement)/500.0).r;
|
||||||
|
|
||||||
smallCloud = abs(largeCloud-0.6) + smallCloud*smallCloud;
|
smallCloud = abs(largeCloud-0.6) + smallCloud*smallCloud;
|
||||||
|
|
||||||
@ -98,18 +98,18 @@ float getCloudShape(int LayerIndex, int LOD, in vec3 position, float minHeight,
|
|||||||
float erosion = 0.0;
|
float erosion = 0.0;
|
||||||
|
|
||||||
if(LayerIndex == SMALLCUMULUS_LAYER){
|
if(LayerIndex == SMALLCUMULUS_LAYER){
|
||||||
erosion += (1.0-densityAtPos(samplePos * 200.0 * CloudLayer0_scale)) * sqrt(1.0-shape);
|
erosion += (1.0-densityAtPos(samplePos * 200.0)) * sqrt(1.0-shape);
|
||||||
|
|
||||||
float falloff = 1.0 - clamp((maxHeight - position.y)/100.0,0.0,1.0);
|
float falloff = 1.0 - clamp((maxHeight - position.y)/100.0,0.0,1.0);
|
||||||
erosion += abs(densityAtPos(samplePos * 600.0 * CloudLayer0_scale) - falloff) * 0.75 * (1.0-shape) * (1.0-falloff*0.25);
|
erosion += abs(densityAtPos(samplePos * 600.0) - falloff) * 0.75 * (1.0-shape) * (1.0-falloff*0.25);
|
||||||
|
|
||||||
erosion = erosion*erosion*erosion*erosion;
|
erosion = erosion*erosion*erosion*erosion;
|
||||||
}
|
}
|
||||||
if(LayerIndex == LARGECUMULUS_LAYER){
|
if(LayerIndex == LARGECUMULUS_LAYER){
|
||||||
erosion += (1.0 - densityAtPos(samplePos * 100.0 * CloudLayer1_scale)) * sqrt(1.0-shape);
|
erosion += (1.0 - densityAtPos(samplePos * 100.0)) * sqrt(1.0-shape);
|
||||||
|
|
||||||
float falloff = 1.0 - clamp((maxHeight - position.y)/200.0,0.0,1.0);
|
float falloff = 1.0 - clamp((maxHeight - position.y)/200.0,0.0,1.0);
|
||||||
erosion += abs(densityAtPos(samplePos * 450.0 * CloudLayer1_scale) - falloff) * 0.75 * (1.0-shape) * (1.0-falloff*0.5);
|
erosion += abs(densityAtPos(samplePos * 450.0) - falloff) * 0.75 * (1.0-shape) * (1.0-falloff*0.5);
|
||||||
|
|
||||||
erosion = erosion*erosion*erosion*erosion;
|
erosion = erosion*erosion*erosion*erosion;
|
||||||
}
|
}
|
||||||
@ -375,7 +375,7 @@ vec4 GetVolumetricClouds(
|
|||||||
float totalAbsorbance = 1.0;
|
float totalAbsorbance = 1.0;
|
||||||
vec4 cloudColor = vec4(color, totalAbsorbance);
|
vec4 cloudColor = vec4(color, totalAbsorbance);
|
||||||
|
|
||||||
float cloudheight = CloudLayer0_tallness / CloudLayer0_scale;
|
float cloudheight = CloudLayer0_tallness;
|
||||||
float minHeight = CloudLayer0_height;
|
float minHeight = CloudLayer0_height;
|
||||||
float maxHeight = cloudheight + minHeight;
|
float maxHeight = cloudheight + minHeight;
|
||||||
|
|
||||||
@ -435,7 +435,7 @@ vec4 GetVolumetricClouds(
|
|||||||
vec4 largeCumulusClouds = cloudColor;
|
vec4 largeCumulusClouds = cloudColor;
|
||||||
|
|
||||||
#ifdef CloudLayer1
|
#ifdef CloudLayer1
|
||||||
cloudheight = CloudLayer1_tallness/CloudLayer1_scale;
|
cloudheight = CloudLayer1_tallness;
|
||||||
minHeight = CloudLayer1_height;
|
minHeight = CloudLayer1_height;
|
||||||
maxHeight = cloudheight + minHeight;
|
maxHeight = cloudheight + minHeight;
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user