Renderer.SkyLight

static SphericalHarmonics SkyLight{ get set }

Description

Sets the lighting information for the scene! You can build one through SphericalHarmonics.FromLights, or grab one from Tex.FromEquirectangular or Tex.GenCubemap

Examples

Setting lighting to an equirect cubemap

Changing the environment’s lighting based on an image is a really great way to instantly get a particular feel to your scene! A neat place to find compatible equirectangular images for this is Poly Haven

Renderer.SkyTex   = Tex.FromCubemapEquirectangular("old_depot.hdr", out SphericalHarmonics lighting);
Renderer.SkyLight = lighting;

And here’s what it looks like applied to the default Material! Default Material example




Found an issue with these docs, or have some additional questions? Create an Issue on Github!