Class Sky
Sky domes: draw an inside-out sphere (Primitives.sphere(r, 24, 32, true))
around the camera with a Material.Type.UNLIT material and setFogged(false). The
colour depends only on the direction from the camera, so the dome's size
and position do not matter. The sun follows the scene's light.
For the sky to light the scene as well, give the Environment matching
hemisphere colours; ScenePresets does both.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFLOATcloud cover, 0 to 1.static final StringVEC3the glow around the sun, scattered into the haze.static final StringVEC3the colour below the horizon.static final StringVEC3the colour at the horizon.static final StringFLOATstar brightness, 0 for none.static final StringVEC3the colour straight up. -
Method Summary
Modifier and TypeMethodDescriptionstatic ShaderMaterialday(ShaderMaterial sky) Sets agradientsky to a clear midday.static ShaderMaterialdusk(ShaderMaterial sky) Sets agradientsky to a warm dusk: deep blue overhead, apricot at the horizon, a big rose glow around a low sun, first stars.static ShaderMaterialgradient()A clear or hazy sky with a sun disc, a wide glow around it, the horizon band and drifting clouds.static ShaderMaterialnight(ShaderMaterial sky) Sets agradientsky to night: dark blue, a cold moon glow, stars.static ShaderMaterialovercast(ShaderMaterial sky) Sets agradientsky to a grey overcast.
-
Field Details
-
ZENITH
-
HORIZON
-
GROUND
-
GLOW
-
CLOUDS
-
STARS
-
-
Method Details
-
gradient
A clear or hazy sky with a sun disc, a wide glow around it, the horizon band and drifting clouds.
Returns
a new shader material
-
day
Sets a
gradientsky to a clear midday.Parameters
sky: a material fromgradient
Returns
the material
-
dusk
Sets a
gradientsky to a warm dusk: deep blue overhead, apricot at the horizon, a big rose glow around a low sun, first stars.Parameters
sky: a material fromgradient
Returns
the material
-
night
Sets a
gradientsky to night: dark blue, a cold moon glow, stars.Parameters
sky: a material fromgradient
Returns
the material
-
overcast
Sets a
gradientsky to a grey overcast.Parameters
sky: a material fromgradient
Returns
the material
-