コード例 #1
0
    void UpdateSettings(LB_LightingProfile profile)
    {
        // Sun Light Update
        if (sunLight)
        {
            sunLight.color           = profile.sunColor;
            sunLight.intensity       = profile.sunIntensity;
            sunLight.bounceIntensity = profile.indirectIntensity;
        }
        else
        {
            Update_Sun(profile);
        }

        if (profile.sunFlare)
        {
            if (sunLight)
            {
                sunLight.flare = profile.sunFlare;
            }
        }
        else
        {
            if (sunLight)
            {
                sunLight.flare = null;
            }
        }

        // Skybox
        helper.Update_SkyBox(profile.Ambient_Enabled, profile.skyBox);

        // Update Ambient
        helper.Update_Ambient(profile.Ambient_Enabled, profile.ambientLight, profile.ambientColor, profile.skyColor, profile.equatorColor, profile.groundColor);

        // Volumetric Light
        helper.Update_VolumetricLight(mainCamera, profile.VL_Enabled, profile.vLight, profile.vLightLevel);

        // Sun Shaft
        helper.Update_SunShaft(mainCamera, profile.SunShaft_Enabled, profile.shaftQuality, profile.shaftDistance, profile.shaftBlur, profile.shaftColor, sunLight.transform);

        // Global Fog
        helper.Update_GlobalFog(mainCamera, profile.Fog_Enabled, profile.fogMode, profile.fogDistance, profile.fogHeight, profile.fogHeightIntensity, profile.fogColor, profile.fogIntensity, profile.Lightweight_Target);
    }
コード例 #2
0
    void UpdateSettings(LB_LightingProfile profile)
    {
        // Sun Light Update
        if (sunLight)
        {
            sunLight.color           = profile.sunColor;
            sunLight.intensity       = profile.sunIntensity;
            sunLight.bounceIntensity = profile.indirectIntensity;
        }
        else
        {
            Update_SunRuntime(profile);
        }

        if (profile.sunFlare)
        {
            if (sunLight)
            {
                sunLight.flare = profile.sunFlare;
            }
        }
        else
        {
            if (sunLight)
            {
                sunLight.flare = null;
            }
        }

        // Update Ambient
        helper.Update_Ambient(profile.Ambient_Enabled, profile.ambientLight, profile.skyCube, profile.skyExposure, profile.hdrRotation, profile.skyTint, profile.groundColor, profile.tickness
                              , profile.gradientTop, profile.gradientMiddle, profile.gradientBottom, profile.gradientDiffusion);

        // Volumetric Light
        //	helper.Update_VolumetricLight(mainCamera,profile.VL_Enabled,profile.vLight,profile.vLightLevel);

        // Sun Shaft
        //	helper.Update_SunShaft(mainCamera,profile.SunShaft_Enabled, profile.shaftQuality,profile.shaftDistance,profile.shaftBlur,profile.shaftColor,sunLight.transform);

        // Global Fog
        helper.Update_GlobalFog(profile.Fog_Enabled, profile.fogMode, profile.fogColorMode, profile.fogColor, profile.fogDistance, profile.fogHeight, profile.fogStart, profile.fogEnd, profile.fogDensity
                                , profile.scatteringAlbedo, profile.freePath, profile.fogAnisotropy, profile.LightProbeDimmer);
    }