Configuration options
Configured shader material ready for rendering
// Basic day sky
const daySky = createSkyMaterial({
timeOfDay: {
sunAngle: 60,
sunIntensity: 1.0
}
});
// Night sky with stars
const nightSky = createSkyMaterial({
timeOfDay: {
sunAngle: 0,
sunIntensity: 0,
starVisibility: 1.0
}
});
// Stormy weather
const stormSky = createSkyMaterial({
timeOfDay: { sunAngle: 45, sunIntensity: 0.3 },
weather: { intensity: 0.8 }
});
// Update uniforms per frame
function animate(time) {
daySky.uniforms.uTime.value = time;
daySky.uniforms.uSunAngle.value = (time % 24) * 7.5;
}
Create a shader material for procedural sky rendering.
Generates a
THREE.ShaderMaterialconfigured for GPU-accelerated atmospheric scattering, day/night cycles, and dynamic weather integration. The material uses custom vertex and fragment shaders for Rayleigh/Mie scattering simulation.Performance: Single material instance per sky; uniforms update per frame (sub-millisecond cost).