Skip to content

Commit 7057844

Browse files
committed
Smoother star transition
1 parent 6bf391a commit 7057844

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

assets/lumi/shaders/common/contrast.glsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,5 @@ const float USER_ALBEDO_BRIGHTENING = clamp(ALBEDO_BRIGHTENING, 0, 20) /
9696
const float EMISSIVE_LIGHT_STR = DEF_EMISSIVE_LIGHT_STR;
9797
const float LIGHTNING_FLASH_STR = DEF_LIGHTNING_FLASH_STR;
9898
// spaghetti
99-
const float STAR_LUMIGATE_HIGH = max(lightLuminance(DEF_DAY_SKY_COLOR) * 0.4, lightLuminance(DEF_NIGHT_SKY_COLOR) + 0.1) * DEF_SKY_STR;
100-
const float STAR_LUMIGATE_LOW = max(STAR_LUMIGATE_HIGH * 0.26, lightLuminance(DEF_NIGHT_SKY_COLOR)) * DEF_SKY_STR;
99+
const float STAR_LUMIGATE_HIGH = max(lightLuminance(DEF_DAY_SKY_COLOR) * 0.4, lightLuminance(DEF_NIGHT_SKY_COLOR) * 1.1) * DEF_SKY_STR;
100+
const float STAR_LUMIGATE_LOW = lightLuminance(DEF_NIGHT_SKY_COLOR) * DEF_SKY_STR;

assets/lumi/shaders/prog/sky.glsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ vec4 customSky(sampler2D sunTexture, sampler2D moonTexture, vec3 toSky, vec3 fal
135135
// Stars
136136
const vec3 NON_MILKY_AXIS = vec3(-0.598964, 0.531492, 0.598964);
137137

138-
float starry = l2_clampScale(STAR_LUMIGATE_HIGH, STAR_LUMIGATE_LOW, lightLuminance(result.rgb));
138+
float starGate = l2_clampScale(STAR_LUMIGATE_HIGH, STAR_LUMIGATE_LOW, lightLuminance(result.rgb));
139+
float starry = starGate * starGate;
139140
starry *= l2_clampScale(-0.6, -0.5, skyDotUp); //prevent star near the void core
140141

141142
float milkyness = l2_clampScale(0.7, 0.0, abs(dot(NON_MILKY_AXIS, toSky.xyz)));

0 commit comments

Comments
 (0)