Pack the resolved environment into the Environment WGSL struct layout:
Environment
sunDirection: vec3 + sunIntensity: f32 → floats 0..3 sunColor: vec3 + ambientIntensity: f32 → floats 4..7 skyColor: vec3 + exposure: f32 → floats 8..11 groundColor: vec3 + fillIntensity: f32 → floats 12..15 rimIntensity: f32 + sunSoftness: f32 + 2 pad → floats 16..19
Optional
Pack the resolved environment into the
EnvironmentWGSL struct layout:sunDirection: vec3 + sunIntensity: f32 → floats 0..3 sunColor: vec3 + ambientIntensity: f32 → floats 4..7 skyColor: vec3 + exposure: f32 → floats 8..11 groundColor: vec3 + fillIntensity: f32 → floats 12..15 rimIntensity: f32 + sunSoftness: f32 + 2 pad → floats 16..19