Exemplo n.º 1
0
        void UpdateLights()
        {
            SphericalHarmonics lighting = SphericalHarmonics.FromLights(lights
                                                                        .ConvertAll(a => new SHLight {
                directionTo = a.pose.position.Normalized(),
                color       = Color.HSV(a.color) * LightIntensity(a.pose.position)
            })
                                                                        .ToArray());

            Renderer.SkyTex   = Tex.GenCubemap(lighting);
            Renderer.SkyLight = lighting;
        }