You are browsing as a guest. Sign up (or log in) to start making projects!

1h 34m 59s logged

made the celestial body halo much bigger and more visible. i also added separate options for the sun and moon halo, and scaled the moon halo’s size based on the moon phase!

also the way I change the halo size is kinda cursed. i’m using qendolin’s superellipse formula, and i only kinda understand how it works.

// i still have no idea how this formula works but it seems to work fine
float superellipse = (
(1.0 + (1.0 / 3.0) * (pow(cos(2.0 * projAngle), 2.0))) * haloSize * (1.0 - abs(superellipseFalloff)) - 1.0
) * sign(-superellipseFalloff);

then i fit an exponential curve based on what halo size i wanted for which moon phase 💀

// larger value = smaller halo size
float haloSize = dayTime() < config.shaderPreset().sunsetEndTime ?
        2.05f - config.sunHaloSizeMultiplier :
        (float) (5 * Math.pow(0.06217, config.moonHaloSizeMultiplier * DimensionType.MOON_BRIGHTNESS_PER_PHASE[moonPhase.index()]));    // curve fit for ideal moon halo size based on phase
0
10

Comments 0

No comments yet. Be the first!