atmosphere: broaden bright sky band above horizon
This commit is contained in:
1 parent
e9b47c5857
commit
7d75707e74
1 file changed
+3
-3
Vendored
+3
-3
@@ -383,7 +383,7 @@ var FRAG_SRC = [
|
|||||||
// skyT floor at 0.5: at and below the horizon the sky keeps
|
// skyT floor at 0.5: at and below the horizon the sky keeps
|
||||||
// the exact horizon colour - the same value the terrain's
|
// the exact horizon colour - the same value the terrain's
|
||||||
// distance fog saturates to, so no seam at the silhouette.
|
// distance fog saturates to, so no seam at the silhouette.
|
||||||
'float skyT = clamp(rd.y * 0.55 + 0.5, 0.5, 1.0);',
|
'float skyT = clamp(rd.y * 0.45 + 0.5, 0.5, 1.0);',
|
||||||
'vec3 col = mix(uBg, uSky, skyT);',
|
'vec3 col = mix(uBg, uSky, skyT);',
|
||||||
'if (uPhysicalSkyOn > 0.5) {',
|
'if (uPhysicalSkyOn > 0.5) {',
|
||||||
'float cosT = dot(rd, uSunDir);',
|
'float cosT = dot(rd, uSunDir);',
|
||||||
@@ -492,10 +492,10 @@ var FRAG_SRC = [
|
|||||||
// the ground has a different colour than the sky next to it
|
// the ground has a different colour than the sky next to it
|
||||||
// and reads as a hard edge.
|
// and reads as a hard edge.
|
||||||
'if (uPhysical > 0.5) {',
|
'if (uPhysical > 0.5) {',
|
||||||
'float lowBand = 1.0 - smoothstep(-0.08, 0.35, rd.y);',
|
'float lowBand = 1.0 - smoothstep(-0.10, 0.55, rd.y);',
|
||||||
'float cosTA = dot(rd, uSunDir);',
|
'float cosTA = dot(rd, uSunDir);',
|
||||||
'float phaseA = 0.5 + 0.5 * cosTA * cosTA;',
|
'float phaseA = 0.5 + 0.5 * cosTA * cosTA;',
|
||||||
'col = mix(col, uAirColor * phaseA * 1.25, lowBand * 0.92);',
|
'col = mix(col, uAirColor * phaseA * 1.45, lowBand * 0.95);',
|
||||||
'}',
|
'}',
|
||||||
'gl_FragColor = vec4(col, 1.0);',
|
'gl_FragColor = vec4(col, 1.0);',
|
||||||
'return;',
|
'return;',
|
||||||
|
|||||||
Reference in new issue
Block a user