get scene looking nice and add fog
This commit is contained in:
parent
78014fcb6f
commit
2bd90b3636
@ -4,7 +4,7 @@
|
||||
"saturation": 0.988528,
|
||||
"gamma": 2.194679,
|
||||
"tonemap": 1,
|
||||
"ssao": 0.864454,
|
||||
"ssao": 0.823773,
|
||||
"dilate_separation": 1.318038,
|
||||
"dilate_size": 7,
|
||||
"dilate_min": 0.142381,
|
||||
@ -12,5 +12,5 @@
|
||||
"dof_blur_size": 2,
|
||||
"dof_min": 2.750411,
|
||||
"dof_max": 15.987307,
|
||||
"dof_point": 14.644861
|
||||
"dof_point": 11.471807
|
||||
}
|
||||
@ -3,160 +3,160 @@
|
||||
"name": "test_scene",
|
||||
"conf": {
|
||||
"skyBase": {
|
||||
"x": 0,
|
||||
"y": 0.739732,
|
||||
"z": 1,
|
||||
"x": 0.969215,
|
||||
"y": 0.677765,
|
||||
"z": 0.237475,
|
||||
"xy": {
|
||||
"x": 0,
|
||||
"y": 0.739732,
|
||||
"x": 0.969215,
|
||||
"y": 0.677765,
|
||||
"component": [
|
||||
0,0.739732
|
||||
0.969215,0.677765
|
||||
]
|
||||
},
|
||||
"yz": {
|
||||
"x": 0.739732,
|
||||
"y": 1,
|
||||
"x": 0.677765,
|
||||
"y": 0.237475,
|
||||
"component": [
|
||||
0.739732,1
|
||||
0.677765,0.237475
|
||||
]
|
||||
},
|
||||
"component": [
|
||||
0,0.739732,1
|
||||
0.969215,0.677765,0.237475
|
||||
]
|
||||
},
|
||||
"skyTop": {
|
||||
"x": 0.00624,
|
||||
"y": 0.079472,
|
||||
"z": 0.319222,
|
||||
"x": 0.884736,
|
||||
"y": 0.566938,
|
||||
"z": 0.011473,
|
||||
"xy": {
|
||||
"x": 0.00624,
|
||||
"y": 0.079472,
|
||||
"x": 0.884736,
|
||||
"y": 0.566938,
|
||||
"component": [
|
||||
0.00624,0.079472
|
||||
0.884736,0.566938
|
||||
]
|
||||
},
|
||||
"yz": {
|
||||
"x": 0.079472,
|
||||
"y": 0.319222,
|
||||
"x": 0.566938,
|
||||
"y": 0.011473,
|
||||
"component": [
|
||||
0.079472,0.319222
|
||||
0.566938,0.011473
|
||||
]
|
||||
},
|
||||
"component": [
|
||||
0.00624,0.079472,0.319222
|
||||
0.884736,0.566938,0.011473
|
||||
]
|
||||
},
|
||||
"sunDisk": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1,
|
||||
"x": 0.923485,
|
||||
"y": 0.505037,
|
||||
"z": 0.050917,
|
||||
"xy": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"x": 0.923485,
|
||||
"y": 0.505037,
|
||||
"component": [
|
||||
1,1
|
||||
0.923485,0.505037
|
||||
]
|
||||
},
|
||||
"yz": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"x": 0.505037,
|
||||
"y": 0.050917,
|
||||
"component": [
|
||||
1,1
|
||||
0.505037,0.050917
|
||||
]
|
||||
},
|
||||
"component": [
|
||||
1,1,1
|
||||
0.923485,0.505037,0.050917
|
||||
]
|
||||
},
|
||||
"horizonHalo": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"xy": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"y": 0,
|
||||
"component": [
|
||||
1,1
|
||||
1,0
|
||||
]
|
||||
},
|
||||
"yz": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"component": [
|
||||
1,1
|
||||
0,0
|
||||
]
|
||||
},
|
||||
"component": [
|
||||
1,1,1
|
||||
1,0,0
|
||||
]
|
||||
},
|
||||
"sunHalo": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1,
|
||||
"x": 0.927747,
|
||||
"y": 0.011937,
|
||||
"z": 0.011937,
|
||||
"xy": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"x": 0.927747,
|
||||
"y": 0.011937,
|
||||
"component": [
|
||||
1,1
|
||||
0.927747,0.011937
|
||||
]
|
||||
},
|
||||
"yz": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"x": 0.011937,
|
||||
"y": 0.011937,
|
||||
"component": [
|
||||
1,1
|
||||
0.011937,0.011937
|
||||
]
|
||||
},
|
||||
"component": [
|
||||
1,1,1
|
||||
0.927747,0.011937,0.011937
|
||||
]
|
||||
},
|
||||
"sunLightColor": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1,
|
||||
"x": 0.866834,
|
||||
"y": 0.505802,
|
||||
"z": 0.032344,
|
||||
"xy": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"x": 0.866834,
|
||||
"y": 0.505802,
|
||||
"component": [
|
||||
1,1
|
||||
0.866834,0.505802
|
||||
]
|
||||
},
|
||||
"yz": {
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"x": 0.505802,
|
||||
"y": 0.032344,
|
||||
"component": [
|
||||
1,1
|
||||
0.505802,0.032344
|
||||
]
|
||||
},
|
||||
"component": [
|
||||
1,1,1
|
||||
0.866834,0.505802,0.032344
|
||||
]
|
||||
},
|
||||
"sunPosition": {
|
||||
"x": -1,
|
||||
"y": 0.4,
|
||||
"z": -0.3,
|
||||
"y": 0.02,
|
||||
"z": -0.5,
|
||||
"xy": {
|
||||
"x": -1,
|
||||
"y": 0.4,
|
||||
"y": 0.02,
|
||||
"component": [
|
||||
-1,0.4
|
||||
-1,0.02
|
||||
]
|
||||
},
|
||||
"yz": {
|
||||
"x": 0.4,
|
||||
"y": -0.3,
|
||||
"x": 0.02,
|
||||
"y": -0.5,
|
||||
"component": [
|
||||
0.4,-0.3
|
||||
0.02,-0.5
|
||||
]
|
||||
},
|
||||
"component": [
|
||||
-1,0.4,-0.3
|
||||
-1,0.02,-0.5
|
||||
]
|
||||
},
|
||||
"sunIntensity": 2,
|
||||
"sunIntensity": 5.695224,
|
||||
"skyIntensity": 1,
|
||||
"hasClouds": 1,
|
||||
"planeHeight": 2.642177,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -163,17 +163,17 @@ vs_sky_source_glsl430 := u8.[
|
||||
float _196 = dot(normalize(skypos), normalize(sunpos));
|
||||
vec3 _199 = normalize(skypos);
|
||||
vec3 final = mix(_178.skyBase, _178.skyTop, vec3(clamp(skypos.y * 2.0, 0.0, 0.699999988079071044921875))) + ((_178.sunHalo * clamp((_196 - 0.9700000286102294921875) * 10.0, 0.0, 0.800000011920928955078125)) * 1.0);
|
||||
if (_196 > 0.999000012874603271484375)
|
||||
if (_196 > 0.999499976634979248046875)
|
||||
{
|
||||
final = _178.sunDisk;
|
||||
final = _178.sunDisk * 10.0;
|
||||
}
|
||||
float _239 = _199.y;
|
||||
final += (mix(_178.horizonHalo, vec3(0.0), vec3(clamp(abs(_239) * 80.0, 0.0, 1.0))) * 0.100000001490116119384765625);
|
||||
float _240 = _199.y;
|
||||
final += (mix(_178.horizonHalo, vec3(0.0), vec3(clamp(abs(_240) * 80.0, 0.0, 1.0))) * 0.100000001490116119384765625);
|
||||
if (_178.hasClouds == 1)
|
||||
{
|
||||
vec3 param = ((_199 / vec3(_239)) * 2.0) + vec3(_178.time * 0.0500000007450580596923828125);
|
||||
float _275 = fbm(param);
|
||||
final = mix(final, vec3(1.0), vec3((max(0.0, _239) * (smoothstep(0.5, 1.0, _275) * 0.300000011920928955078125)) * 2.0));
|
||||
vec3 param = ((_199 / vec3(_240)) * 2.0) + vec3(_178.time * 0.0500000007450580596923828125);
|
||||
float _276 = fbm(param);
|
||||
final = mix(final, vec3(1.0), vec3((max(0.0, _240) * (smoothstep(0.5, 1.0, _276) * 0.300000011920928955078125)) * 2.0));
|
||||
}
|
||||
return final;
|
||||
}
|
||||
@ -382,50 +382,51 @@ fs_sky_source_glsl430 := u8.[
|
||||
0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,
|
||||
0x37,0x38,0x31,0x32,0x35,0x29,0x29,0x20,0x2a,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,
|
||||
0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x39,0x36,0x20,0x3e,0x20,0x30,
|
||||
0x2e,0x39,0x39,0x39,0x30,0x30,0x30,0x30,0x31,0x32,0x38,0x37,0x34,0x36,0x30,0x33,
|
||||
0x32,0x37,0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
||||
0x2e,0x39,0x39,0x39,0x34,0x39,0x39,0x39,0x37,0x36,0x36,0x33,0x34,0x39,0x37,0x39,
|
||||
0x32,0x34,0x38,0x30,0x34,0x36,0x38,0x37,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,
|
||||
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x3d,
|
||||
0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,0x75,0x6e,0x44,0x69,0x73,0x6b,0x3b,0x0a,0x20,
|
||||
0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
|
||||
0x32,0x33,0x39,0x20,0x3d,0x20,0x5f,0x31,0x39,0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,
|
||||
0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x2b,0x3d,0x20,0x28,0x6d,0x69,0x78,0x28,
|
||||
0x5f,0x31,0x37,0x38,0x2e,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,0x61,0x6c,0x6f,
|
||||
0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,
|
||||
0x33,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x61,0x62,0x73,0x28,0x5f,0x32,0x33,0x39,
|
||||
0x29,0x20,0x2a,0x20,0x38,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,
|
||||
0x2e,0x30,0x29,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,
|
||||
0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,
|
||||
0x36,0x35,0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,
|
||||
0x5f,0x31,0x37,0x38,0x2e,0x68,0x61,0x73,0x43,0x6c,0x6f,0x75,0x64,0x73,0x20,0x3d,
|
||||
0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
||||
0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,
|
||||
0x28,0x28,0x5f,0x31,0x39,0x39,0x20,0x2f,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x32,
|
||||
0x33,0x39,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2b,0x20,0x76,0x65,
|
||||
0x63,0x33,0x28,0x5f,0x31,0x37,0x38,0x2e,0x74,0x69,0x6d,0x65,0x20,0x2a,0x20,0x30,
|
||||
0x2e,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x37,0x34,0x35,0x30,0x35,0x38,
|
||||
0x30,0x35,0x39,0x36,0x39,0x32,0x33,0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,
|
||||
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,
|
||||
0x37,0x35,0x20,0x3d,0x20,0x66,0x62,0x6d,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,
|
||||
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x3d,
|
||||
0x20,0x6d,0x69,0x78,0x28,0x66,0x69,0x6e,0x61,0x6c,0x2c,0x20,0x76,0x65,0x63,0x33,
|
||||
0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x28,0x6d,0x61,0x78,
|
||||
0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x32,0x33,0x39,0x29,0x20,0x2a,0x20,0x28,0x73,
|
||||
0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x35,0x2c,0x20,0x31,
|
||||
0x2e,0x30,0x2c,0x20,0x5f,0x32,0x37,0x35,0x29,0x20,0x2a,0x20,0x30,0x2e,0x33,0x30,
|
||||
0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,
|
||||
0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,
|
||||
0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,
|
||||
0x72,0x6e,0x20,0x66,0x69,0x6e,0x61,0x6c,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,
|
||||
0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,
|
||||
0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,
|
||||
0x61,0x6c,0x69,0x7a,0x65,0x28,0x70,0x6f,0x73,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,
|
||||
0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,
|
||||
0x20,0x3d,0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,
|
||||
0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,
|
||||
0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x73,0x6b,0x79,0x28,0x70,
|
||||
0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x20,0x2a,
|
||||
0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,0x6b,0x79,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,
|
||||
0x74,0x79,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
||||
0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,0x75,0x6e,0x44,0x69,0x73,0x6b,0x20,0x2a,0x20,
|
||||
0x31,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
||||
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x34,0x30,0x20,0x3d,0x20,0x5f,0x31,0x39,
|
||||
0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x2b,
|
||||
0x3d,0x20,0x28,0x6d,0x69,0x78,0x28,0x5f,0x31,0x37,0x38,0x2e,0x68,0x6f,0x72,0x69,
|
||||
0x7a,0x6f,0x6e,0x48,0x61,0x6c,0x6f,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,
|
||||
0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x61,
|
||||
0x62,0x73,0x28,0x5f,0x32,0x34,0x30,0x29,0x20,0x2a,0x20,0x38,0x30,0x2e,0x30,0x2c,
|
||||
0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x29,0x20,0x2a,0x20,0x30,
|
||||
0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,
|
||||
0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,
|
||||
0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x37,0x38,0x2e,0x68,0x61,0x73,0x43,
|
||||
0x6c,0x6f,0x75,0x64,0x73,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,
|
||||
0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,
|
||||
0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x28,0x28,0x5f,0x31,0x39,0x39,0x20,0x2f,0x20,
|
||||
0x76,0x65,0x63,0x33,0x28,0x5f,0x32,0x34,0x30,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,
|
||||
0x30,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x31,0x37,0x38,0x2e,0x74,
|
||||
0x69,0x6d,0x65,0x20,0x2a,0x20,0x30,0x2e,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,
|
||||
0x30,0x37,0x34,0x35,0x30,0x35,0x38,0x30,0x35,0x39,0x36,0x39,0x32,0x33,0x38,0x32,
|
||||
0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
|
||||
0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x37,0x36,0x20,0x3d,0x20,0x66,0x62,0x6d,0x28,
|
||||
0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
||||
0x66,0x69,0x6e,0x61,0x6c,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x66,0x69,0x6e,0x61,
|
||||
0x6c,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,
|
||||
0x63,0x33,0x28,0x28,0x6d,0x61,0x78,0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x32,0x34,
|
||||
0x30,0x29,0x20,0x2a,0x20,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,
|
||||
0x28,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x5f,0x32,0x37,0x36,0x29,
|
||||
0x20,0x2a,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,
|
||||
0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x29,0x20,
|
||||
0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
||||
0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x69,0x6e,0x61,0x6c,0x3b,
|
||||
0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,
|
||||
0x7b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,
|
||||
0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x70,0x6f,0x73,
|
||||
0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x76,0x65,0x63,0x33,0x20,
|
||||
0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,
|
||||
0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
||||
0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,
|
||||
0x34,0x28,0x73,0x6b,0x79,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,
|
||||
0x61,0x6d,0x5f,0x31,0x29,0x20,0x2a,0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,0x6b,0x79,
|
||||
0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,
|
||||
0x0a,0x7d,0x0a,0x0a,0x00,
|
||||
];
|
||||
/*
|
||||
#version 300 es
|
||||
@ -538,17 +539,17 @@ vs_sky_source_glsl300es := u8.[
|
||||
highp float _196 = dot(normalize(skypos), normalize(sunpos));
|
||||
highp vec3 _199 = normalize(skypos);
|
||||
highp vec3 final = mix(_178.skyBase, _178.skyTop, vec3(clamp(skypos.y * 2.0, 0.0, 0.699999988079071044921875))) + ((_178.sunHalo * clamp((_196 - 0.9700000286102294921875) * 10.0, 0.0, 0.800000011920928955078125)) * 1.0);
|
||||
if (_196 > 0.999000012874603271484375)
|
||||
if (_196 > 0.999499976634979248046875)
|
||||
{
|
||||
final = _178.sunDisk;
|
||||
final = _178.sunDisk * 10.0;
|
||||
}
|
||||
highp float _239 = _199.y;
|
||||
final += (mix(_178.horizonHalo, vec3(0.0), vec3(clamp(abs(_239) * 80.0, 0.0, 1.0))) * 0.100000001490116119384765625);
|
||||
highp float _240 = _199.y;
|
||||
final += (mix(_178.horizonHalo, vec3(0.0), vec3(clamp(abs(_240) * 80.0, 0.0, 1.0))) * 0.100000001490116119384765625);
|
||||
if (_178.hasClouds == 1)
|
||||
{
|
||||
highp vec3 param = ((_199 / vec3(_239)) * 2.0) + vec3(_178.time * 0.0500000007450580596923828125);
|
||||
highp float _275 = fbm(param);
|
||||
final = mix(final, vec3(1.0), vec3((max(0.0, _239) * (smoothstep(0.5, 1.0, _275) * 0.300000011920928955078125)) * 2.0));
|
||||
highp vec3 param = ((_199 / vec3(_240)) * 2.0) + vec3(_178.time * 0.0500000007450580596923828125);
|
||||
highp float _276 = fbm(param);
|
||||
final = mix(final, vec3(1.0), vec3((max(0.0, _240) * (smoothstep(0.5, 1.0, _276) * 0.300000011920928955078125)) * 2.0));
|
||||
}
|
||||
return final;
|
||||
}
|
||||
@ -776,53 +777,53 @@ fs_sky_source_glsl300es := u8.[
|
||||
0x20,0x30,0x2e,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,
|
||||
0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x29,0x20,0x2a,0x20,
|
||||
0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,
|
||||
0x39,0x36,0x20,0x3e,0x20,0x30,0x2e,0x39,0x39,0x39,0x30,0x30,0x30,0x30,0x31,0x32,
|
||||
0x38,0x37,0x34,0x36,0x30,0x33,0x32,0x37,0x31,0x34,0x38,0x34,0x33,0x37,0x35,0x29,
|
||||
0x39,0x36,0x20,0x3e,0x20,0x30,0x2e,0x39,0x39,0x39,0x34,0x39,0x39,0x39,0x37,0x36,
|
||||
0x36,0x33,0x34,0x39,0x37,0x39,0x32,0x34,0x38,0x30,0x34,0x36,0x38,0x37,0x35,0x29,
|
||||
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,
|
||||
0x69,0x6e,0x61,0x6c,0x20,0x3d,0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,0x75,0x6e,0x44,
|
||||
0x69,0x73,0x6b,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,
|
||||
0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x33,0x39,0x20,
|
||||
0x3d,0x20,0x5f,0x31,0x39,0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x69,
|
||||
0x6e,0x61,0x6c,0x20,0x2b,0x3d,0x20,0x28,0x6d,0x69,0x78,0x28,0x5f,0x31,0x37,0x38,
|
||||
0x2e,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,0x61,0x6c,0x6f,0x2c,0x20,0x76,0x65,
|
||||
0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x63,0x6c,
|
||||
0x61,0x6d,0x70,0x28,0x61,0x62,0x73,0x28,0x5f,0x32,0x33,0x39,0x29,0x20,0x2a,0x20,
|
||||
0x38,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,
|
||||
0x29,0x20,0x2a,0x20,0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,
|
||||
0x39,0x30,0x31,0x31,0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,
|
||||
0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x37,0x38,
|
||||
0x2e,0x68,0x61,0x73,0x43,0x6c,0x6f,0x75,0x64,0x73,0x20,0x3d,0x3d,0x20,0x31,0x29,
|
||||
0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,
|
||||
0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,
|
||||
0x3d,0x20,0x28,0x28,0x5f,0x31,0x39,0x39,0x20,0x2f,0x20,0x76,0x65,0x63,0x33,0x28,
|
||||
0x5f,0x32,0x33,0x39,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2b,0x20,
|
||||
0x76,0x65,0x63,0x33,0x28,0x5f,0x31,0x37,0x38,0x2e,0x74,0x69,0x6d,0x65,0x20,0x2a,
|
||||
0x20,0x30,0x2e,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x37,0x34,0x35,0x30,
|
||||
0x35,0x38,0x30,0x35,0x39,0x36,0x39,0x32,0x33,0x38,0x32,0x38,0x31,0x32,0x35,0x29,
|
||||
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,
|
||||
0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x37,0x35,0x20,0x3d,0x20,0x66,0x62,0x6d,
|
||||
0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
||||
0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x66,0x69,0x6e,
|
||||
0x61,0x6c,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,
|
||||
0x65,0x63,0x33,0x28,0x28,0x6d,0x61,0x78,0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x32,
|
||||
0x33,0x39,0x29,0x20,0x2a,0x20,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,
|
||||
0x70,0x28,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x5f,0x32,0x37,0x35,
|
||||
0x29,0x20,0x2a,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,
|
||||
0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x29,
|
||||
0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,
|
||||
0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x69,0x6e,0x61,0x6c,
|
||||
0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,
|
||||
0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,
|
||||
0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,
|
||||
0x69,0x7a,0x65,0x28,0x70,0x6f,0x73,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,
|
||||
0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,
|
||||
0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,0x75,0x6e,0x50,
|
||||
0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x72,0x61,
|
||||
0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x76,0x65,0x63,0x34,0x28,0x73,
|
||||
0x6b,0x79,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
||||
0x31,0x29,0x20,0x2a,0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,0x6b,0x79,0x49,0x6e,0x74,
|
||||
0x65,0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,
|
||||
0x0a,0x00,
|
||||
0x69,0x73,0x6b,0x20,0x2a,0x20,0x31,0x30,0x2e,0x30,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
||||
0x7d,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,
|
||||
0x74,0x20,0x5f,0x32,0x34,0x30,0x20,0x3d,0x20,0x5f,0x31,0x39,0x39,0x2e,0x79,0x3b,
|
||||
0x0a,0x20,0x20,0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x2b,0x3d,0x20,0x28,0x6d,
|
||||
0x69,0x78,0x28,0x5f,0x31,0x37,0x38,0x2e,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,
|
||||
0x61,0x6c,0x6f,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,
|
||||
0x76,0x65,0x63,0x33,0x28,0x63,0x6c,0x61,0x6d,0x70,0x28,0x61,0x62,0x73,0x28,0x5f,
|
||||
0x32,0x34,0x30,0x29,0x20,0x2a,0x20,0x38,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,
|
||||
0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x31,0x30,0x30,
|
||||
0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,0x31,0x31,0x39,0x33,
|
||||
0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,
|
||||
0x66,0x20,0x28,0x5f,0x31,0x37,0x38,0x2e,0x68,0x61,0x73,0x43,0x6c,0x6f,0x75,0x64,
|
||||
0x73,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,
|
||||
0x20,0x20,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,
|
||||
0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x28,0x28,0x5f,0x31,0x39,0x39,0x20,
|
||||
0x2f,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x32,0x34,0x30,0x29,0x29,0x20,0x2a,0x20,
|
||||
0x32,0x2e,0x30,0x29,0x20,0x2b,0x20,0x76,0x65,0x63,0x33,0x28,0x5f,0x31,0x37,0x38,
|
||||
0x2e,0x74,0x69,0x6d,0x65,0x20,0x2a,0x20,0x30,0x2e,0x30,0x35,0x30,0x30,0x30,0x30,
|
||||
0x30,0x30,0x30,0x37,0x34,0x35,0x30,0x35,0x38,0x30,0x35,0x39,0x36,0x39,0x32,0x33,
|
||||
0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
|
||||
0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x37,
|
||||
0x36,0x20,0x3d,0x20,0x66,0x62,0x6d,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,
|
||||
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x3d,0x20,
|
||||
0x6d,0x69,0x78,0x28,0x66,0x69,0x6e,0x61,0x6c,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,
|
||||
0x31,0x2e,0x30,0x29,0x2c,0x20,0x76,0x65,0x63,0x33,0x28,0x28,0x6d,0x61,0x78,0x28,
|
||||
0x30,0x2e,0x30,0x2c,0x20,0x5f,0x32,0x34,0x30,0x29,0x20,0x2a,0x20,0x28,0x73,0x6d,
|
||||
0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,
|
||||
0x30,0x2c,0x20,0x5f,0x32,0x37,0x36,0x29,0x20,0x2a,0x20,0x30,0x2e,0x33,0x30,0x30,
|
||||
0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,
|
||||
0x37,0x38,0x31,0x32,0x35,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x3b,
|
||||
0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,
|
||||
0x6e,0x20,0x66,0x69,0x6e,0x61,0x6c,0x3b,0x0a,0x7d,0x0a,0x0a,0x76,0x6f,0x69,0x64,
|
||||
0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,
|
||||
0x67,0x68,0x70,0x20,0x76,0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,
|
||||
0x20,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x70,0x6f,0x73,0x2e,0x78,
|
||||
0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x68,0x69,0x67,0x68,0x70,0x20,0x76,
|
||||
0x65,0x63,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x5f,0x31,
|
||||
0x37,0x38,0x2e,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x3b,0x0a,
|
||||
0x20,0x20,0x20,0x20,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
|
||||
0x20,0x76,0x65,0x63,0x34,0x28,0x73,0x6b,0x79,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,
|
||||
0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x29,0x20,0x2a,0x20,0x5f,0x31,0x37,0x38,
|
||||
0x2e,0x73,0x6b,0x79,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x31,
|
||||
0x2e,0x30,0x29,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
||||
];
|
||||
/*
|
||||
#include <metal_stdlib>
|
||||
@ -979,17 +980,17 @@ vs_sky_source_metal_macos := u8.[
|
||||
float _196 = dot(fast::normalize(skypos), fast::normalize(sunpos));
|
||||
float3 _199 = fast::normalize(skypos);
|
||||
float3 final = mix(_178.skyBase, _178.skyTop, float3(fast::clamp(skypos.y * 2.0, 0.0, 0.699999988079071044921875))) + ((_178.sunHalo * fast::clamp((_196 - 0.9700000286102294921875) * 10.0, 0.0, 0.800000011920928955078125)) * 1.0);
|
||||
if (_196 > 0.999000012874603271484375)
|
||||
if (_196 > 0.999499976634979248046875)
|
||||
{
|
||||
final = _178.sunDisk;
|
||||
final = _178.sunDisk * 10.0;
|
||||
}
|
||||
float _239 = _199.y;
|
||||
final += (mix(_178.horizonHalo, float3(0.0), float3(fast::clamp(abs(_239) * 80.0, 0.0, 1.0))) * 0.100000001490116119384765625);
|
||||
float _240 = _199.y;
|
||||
final += (mix(_178.horizonHalo, float3(0.0), float3(fast::clamp(abs(_240) * 80.0, 0.0, 1.0))) * 0.100000001490116119384765625);
|
||||
if (_178.hasClouds == 1)
|
||||
{
|
||||
float3 param = ((_199 / float3(_239)) * 2.0) + float3(_178.time * 0.0500000007450580596923828125);
|
||||
float _275 = fbm(param);
|
||||
final = mix(final, float3(1.0), float3((fast::max(0.0, _239) * (smoothstep(0.5, 1.0, _275) * 0.300000011920928955078125)) * 2.0));
|
||||
float3 param = ((_199 / float3(_240)) * 2.0) + float3(_178.time * 0.0500000007450580596923828125);
|
||||
float _276 = fbm(param);
|
||||
final = mix(final, float3(1.0), float3((fast::max(0.0, _240) * (smoothstep(0.5, 1.0, _276) * 0.300000011920928955078125)) * 2.0));
|
||||
}
|
||||
return final;
|
||||
}
|
||||
@ -1232,63 +1233,63 @@ fs_sky_source_metal_macos := u8.[
|
||||
0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,
|
||||
0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,
|
||||
0x29,0x20,0x2a,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,
|
||||
0x20,0x28,0x5f,0x31,0x39,0x36,0x20,0x3e,0x20,0x30,0x2e,0x39,0x39,0x39,0x30,0x30,
|
||||
0x30,0x30,0x31,0x32,0x38,0x37,0x34,0x36,0x30,0x33,0x32,0x37,0x31,0x34,0x38,0x34,
|
||||
0x33,0x37,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
||||
0x20,0x28,0x5f,0x31,0x39,0x36,0x20,0x3e,0x20,0x30,0x2e,0x39,0x39,0x39,0x34,0x39,
|
||||
0x39,0x39,0x37,0x36,0x36,0x33,0x34,0x39,0x37,0x39,0x32,0x34,0x38,0x30,0x34,0x36,
|
||||
0x38,0x37,0x35,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
||||
0x20,0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x3d,0x20,0x5f,0x31,0x37,0x38,0x2e,
|
||||
0x73,0x75,0x6e,0x44,0x69,0x73,0x6b,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,
|
||||
0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x33,0x39,0x20,0x3d,0x20,
|
||||
0x5f,0x31,0x39,0x39,0x2e,0x79,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x69,0x6e,0x61,
|
||||
0x6c,0x20,0x2b,0x3d,0x20,0x28,0x6d,0x69,0x78,0x28,0x5f,0x31,0x37,0x38,0x2e,0x68,
|
||||
0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,0x61,0x6c,0x6f,0x2c,0x20,0x66,0x6c,0x6f,0x61,
|
||||
0x74,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,
|
||||
0x66,0x61,0x73,0x74,0x3a,0x3a,0x63,0x6c,0x61,0x6d,0x70,0x28,0x61,0x62,0x73,0x28,
|
||||
0x5f,0x32,0x33,0x39,0x29,0x20,0x2a,0x20,0x38,0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,
|
||||
0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x29,0x20,0x2a,0x20,0x30,0x2e,0x31,0x30,
|
||||
0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,0x30,0x31,0x31,0x36,0x31,0x31,0x39,
|
||||
0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
||||
0x69,0x66,0x20,0x28,0x5f,0x31,0x37,0x38,0x2e,0x68,0x61,0x73,0x43,0x6c,0x6f,0x75,
|
||||
0x64,0x73,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,
|
||||
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,
|
||||
0x72,0x61,0x6d,0x20,0x3d,0x20,0x28,0x28,0x5f,0x31,0x39,0x39,0x20,0x2f,0x20,0x66,
|
||||
0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x32,0x33,0x39,0x29,0x29,0x20,0x2a,0x20,0x32,
|
||||
0x2e,0x30,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x31,0x37,
|
||||
0x38,0x2e,0x74,0x69,0x6d,0x65,0x20,0x2a,0x20,0x30,0x2e,0x30,0x35,0x30,0x30,0x30,
|
||||
0x30,0x30,0x30,0x30,0x37,0x34,0x35,0x30,0x35,0x38,0x30,0x35,0x39,0x36,0x39,0x32,
|
||||
0x33,0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,
|
||||
0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,0x32,0x37,0x35,0x20,0x3d,0x20,0x66,
|
||||
0x62,0x6d,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,
|
||||
0x20,0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x3d,0x20,0x6d,0x69,0x78,0x28,0x66,
|
||||
0x69,0x6e,0x61,0x6c,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x31,0x2e,0x30,
|
||||
0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x28,0x66,0x61,0x73,0x74,0x3a,
|
||||
0x3a,0x6d,0x61,0x78,0x28,0x30,0x2e,0x30,0x2c,0x20,0x5f,0x32,0x33,0x39,0x29,0x20,
|
||||
0x2a,0x20,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,0x73,0x74,0x65,0x70,0x28,0x30,0x2e,
|
||||
0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x5f,0x32,0x37,0x35,0x29,0x20,0x2a,0x20,
|
||||
0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x31,0x39,0x32,0x30,0x39,0x32,
|
||||
0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,0x35,0x29,0x29,0x20,0x2a,0x20,0x32,
|
||||
0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,
|
||||
0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x69,0x6e,0x61,0x6c,0x3b,0x0a,0x7d,0x0a,
|
||||
0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,
|
||||
0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,
|
||||
0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,
|
||||
0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,0x61,0x6e,0x74,0x20,0x73,0x6b,0x79,
|
||||
0x5f,0x77,0x6f,0x72,0x6c,0x64,0x5f,0x63,0x6f,0x6e,0x66,0x69,0x67,0x26,0x20,0x5f,
|
||||
0x31,0x37,0x38,0x20,0x5b,0x5b,0x62,0x75,0x66,0x66,0x65,0x72,0x28,0x30,0x29,0x5d,
|
||||
0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,
|
||||
0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,
|
||||
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,
|
||||
0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,
|
||||
0x69,0x6e,0x2e,0x70,0x6f,0x73,0x2e,0x78,0x79,0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
||||
0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,
|
||||
0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x31,0x37,0x38,0x2e,0x73,0x75,
|
||||
0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,
|
||||
0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,
|
||||
0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x73,0x6b,0x79,0x28,0x70,0x61,0x72,0x61,
|
||||
0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,0x31,0x2c,0x20,0x5f,0x31,0x37,0x38,
|
||||
0x29,0x20,0x2a,0x20,0x5f,0x31,0x37,0x38,0x2e,0x73,0x6b,0x79,0x49,0x6e,0x74,0x65,
|
||||
0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x31,0x2e,0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
||||
0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,
|
||||
0x00,
|
||||
0x73,0x75,0x6e,0x44,0x69,0x73,0x6b,0x20,0x2a,0x20,0x31,0x30,0x2e,0x30,0x3b,0x0a,
|
||||
0x20,0x20,0x20,0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,
|
||||
0x5f,0x32,0x34,0x30,0x20,0x3d,0x20,0x5f,0x31,0x39,0x39,0x2e,0x79,0x3b,0x0a,0x20,
|
||||
0x20,0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,0x2b,0x3d,0x20,0x28,0x6d,0x69,0x78,
|
||||
0x28,0x5f,0x31,0x37,0x38,0x2e,0x68,0x6f,0x72,0x69,0x7a,0x6f,0x6e,0x48,0x61,0x6c,
|
||||
0x6f,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x30,0x2e,0x30,0x29,0x2c,0x20,
|
||||
0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x63,0x6c,0x61,
|
||||
0x6d,0x70,0x28,0x61,0x62,0x73,0x28,0x5f,0x32,0x34,0x30,0x29,0x20,0x2a,0x20,0x38,
|
||||
0x30,0x2e,0x30,0x2c,0x20,0x30,0x2e,0x30,0x2c,0x20,0x31,0x2e,0x30,0x29,0x29,0x29,
|
||||
0x20,0x2a,0x20,0x30,0x2e,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x31,0x34,0x39,
|
||||
0x30,0x31,0x31,0x36,0x31,0x31,0x39,0x33,0x38,0x34,0x37,0x36,0x35,0x36,0x32,0x35,
|
||||
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x69,0x66,0x20,0x28,0x5f,0x31,0x37,0x38,0x2e,
|
||||
0x68,0x61,0x73,0x43,0x6c,0x6f,0x75,0x64,0x73,0x20,0x3d,0x3d,0x20,0x31,0x29,0x0a,
|
||||
0x20,0x20,0x20,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,
|
||||
0x6f,0x61,0x74,0x33,0x20,0x70,0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x28,0x28,0x5f,
|
||||
0x31,0x39,0x39,0x20,0x2f,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,0x5f,0x32,0x34,
|
||||
0x30,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x20,0x2b,0x20,0x66,0x6c,0x6f,
|
||||
0x61,0x74,0x33,0x28,0x5f,0x31,0x37,0x38,0x2e,0x74,0x69,0x6d,0x65,0x20,0x2a,0x20,
|
||||
0x30,0x2e,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x37,0x34,0x35,0x30,0x35,
|
||||
0x38,0x30,0x35,0x39,0x36,0x39,0x32,0x33,0x38,0x32,0x38,0x31,0x32,0x35,0x29,0x3b,
|
||||
0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x20,0x5f,
|
||||
0x32,0x37,0x36,0x20,0x3d,0x20,0x66,0x62,0x6d,0x28,0x70,0x61,0x72,0x61,0x6d,0x29,
|
||||
0x3b,0x0a,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x66,0x69,0x6e,0x61,0x6c,0x20,
|
||||
0x3d,0x20,0x6d,0x69,0x78,0x28,0x66,0x69,0x6e,0x61,0x6c,0x2c,0x20,0x66,0x6c,0x6f,
|
||||
0x61,0x74,0x33,0x28,0x31,0x2e,0x30,0x29,0x2c,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,
|
||||
0x28,0x28,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6d,0x61,0x78,0x28,0x30,0x2e,0x30,0x2c,
|
||||
0x20,0x5f,0x32,0x34,0x30,0x29,0x20,0x2a,0x20,0x28,0x73,0x6d,0x6f,0x6f,0x74,0x68,
|
||||
0x73,0x74,0x65,0x70,0x28,0x30,0x2e,0x35,0x2c,0x20,0x31,0x2e,0x30,0x2c,0x20,0x5f,
|
||||
0x32,0x37,0x36,0x29,0x20,0x2a,0x20,0x30,0x2e,0x33,0x30,0x30,0x30,0x30,0x30,0x30,
|
||||
0x31,0x31,0x39,0x32,0x30,0x39,0x32,0x38,0x39,0x35,0x35,0x30,0x37,0x38,0x31,0x32,
|
||||
0x35,0x29,0x29,0x20,0x2a,0x20,0x32,0x2e,0x30,0x29,0x29,0x3b,0x0a,0x20,0x20,0x20,
|
||||
0x20,0x7d,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x66,0x69,
|
||||
0x6e,0x61,0x6c,0x3b,0x0a,0x7d,0x0a,0x0a,0x66,0x72,0x61,0x67,0x6d,0x65,0x6e,0x74,
|
||||
0x20,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6d,0x61,0x69,0x6e,0x30,
|
||||
0x28,0x6d,0x61,0x69,0x6e,0x30,0x5f,0x69,0x6e,0x20,0x69,0x6e,0x20,0x5b,0x5b,0x73,
|
||||
0x74,0x61,0x67,0x65,0x5f,0x69,0x6e,0x5d,0x5d,0x2c,0x20,0x63,0x6f,0x6e,0x73,0x74,
|
||||
0x61,0x6e,0x74,0x20,0x73,0x6b,0x79,0x5f,0x77,0x6f,0x72,0x6c,0x64,0x5f,0x63,0x6f,
|
||||
0x6e,0x66,0x69,0x67,0x26,0x20,0x5f,0x31,0x37,0x38,0x20,0x5b,0x5b,0x62,0x75,0x66,
|
||||
0x66,0x65,0x72,0x28,0x30,0x29,0x5d,0x5d,0x29,0x0a,0x7b,0x0a,0x20,0x20,0x20,0x20,
|
||||
0x6d,0x61,0x69,0x6e,0x30,0x5f,0x6f,0x75,0x74,0x20,0x6f,0x75,0x74,0x20,0x3d,0x20,
|
||||
0x7b,0x7d,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,
|
||||
0x61,0x72,0x61,0x6d,0x20,0x3d,0x20,0x66,0x61,0x73,0x74,0x3a,0x3a,0x6e,0x6f,0x72,
|
||||
0x6d,0x61,0x6c,0x69,0x7a,0x65,0x28,0x69,0x6e,0x2e,0x70,0x6f,0x73,0x2e,0x78,0x79,
|
||||
0x7a,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x20,0x70,
|
||||
0x61,0x72,0x61,0x6d,0x5f,0x31,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x33,0x28,
|
||||
0x5f,0x31,0x37,0x38,0x2e,0x73,0x75,0x6e,0x50,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,
|
||||
0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x6f,0x75,0x74,0x2e,0x66,0x72,0x61,0x67,0x5f,
|
||||
0x63,0x6f,0x6c,0x6f,0x72,0x20,0x3d,0x20,0x66,0x6c,0x6f,0x61,0x74,0x34,0x28,0x73,
|
||||
0x6b,0x79,0x28,0x70,0x61,0x72,0x61,0x6d,0x2c,0x20,0x70,0x61,0x72,0x61,0x6d,0x5f,
|
||||
0x31,0x2c,0x20,0x5f,0x31,0x37,0x38,0x29,0x20,0x2a,0x20,0x5f,0x31,0x37,0x38,0x2e,
|
||||
0x73,0x6b,0x79,0x49,0x6e,0x74,0x65,0x6e,0x73,0x69,0x74,0x79,0x2c,0x20,0x31,0x2e,
|
||||
0x30,0x29,0x3b,0x0a,0x20,0x20,0x20,0x20,0x72,0x65,0x74,0x75,0x72,0x6e,0x20,0x6f,
|
||||
0x75,0x74,0x3b,0x0a,0x7d,0x0a,0x0a,0x00,
|
||||
];
|
||||
sky_shader_desc :: (backend: sg_backend) -> sg_shader_desc {
|
||||
desc: sg_shader_desc;
|
||||
|
||||
@ -10,11 +10,13 @@ layout(binding=0) uniform plane_vs_params {
|
||||
|
||||
out vec4 pos;
|
||||
out flat int idx;
|
||||
out float depth;
|
||||
|
||||
void main() {
|
||||
vec3 multisize = vec3(position.xyz * 1000.0);
|
||||
multisize.y += float(gl_InstanceIndex) * planeHeight;
|
||||
gl_Position = mvp * vec4(multisize, 1.0);
|
||||
depth = gl_Position.z;
|
||||
pos = vec4(multisize, 1.0);
|
||||
idx = gl_InstanceIndex;
|
||||
}
|
||||
@ -24,6 +26,7 @@ void main() {
|
||||
|
||||
in vec4 pos;
|
||||
in flat int idx;
|
||||
in float depth;
|
||||
out vec4 frag_color;
|
||||
|
||||
// Uniform bindings from the original shader
|
||||
@ -101,6 +104,12 @@ float fbm(vec2 p) {
|
||||
return value;
|
||||
}
|
||||
|
||||
vec3 sky(vec3 skypos, vec3 sunpos) {
|
||||
vec3 skyGradient = mix(skyBase, skyTop, clamp(skypos.y * 2.0, 0.0, 0.7));
|
||||
vec3 final = skyGradient;
|
||||
return final;
|
||||
}
|
||||
|
||||
void main() {
|
||||
if(idx == 1) { // Second instance of the plane is the actual water surface.
|
||||
vec2 uv1 = pos.xz * 0.4 + time * vec2(-0.005, -0.012) * 1.5;
|
||||
@ -138,7 +147,10 @@ void main() {
|
||||
float reflection_alpha = 0.5;
|
||||
float alpha = mix(refraction_alpha, reflection_alpha, fresnel);
|
||||
|
||||
frag_color = vec4(final_color, alpha);
|
||||
vec3 fog = skyIntensity * sky(normalize(pos.xyz), sunPosition);
|
||||
float fogFactor = smoothstep(950.0, 1000.0, length(pos.xz));
|
||||
|
||||
frag_color = vec4(mix(final_color, fog, fogFactor), mix(alpha, 1.0, fogFactor));
|
||||
|
||||
} else { // Deep water plane
|
||||
vec2 noise_uv = pos.xz * 0.05 + time * 0.01;
|
||||
|
||||
@ -91,8 +91,8 @@ vec3 sky(vec3 skypos, vec3 sunpos) {
|
||||
final += sunHalo.xyz * clamp((sDist - 0.97) * 10.0, 0.0, 0.8) * 1.0;
|
||||
|
||||
// Sun disk
|
||||
if(sDist > 0.999) {
|
||||
final = sunDisk.xyz;
|
||||
if(sDist > 0.9995) {
|
||||
final = sunDisk.xyz * 10.0;
|
||||
}
|
||||
|
||||
// Horizon halo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user