コード例 #1
0
    void UpdatePostEffects(LB_LightingProfile profile)
    {
        if (!helper)
        {
            helper = GameObject.Find("LightingBox_Helper").GetComponent <LB_LightingBoxHelper> ();
        }

        if (!profile)
        {
            return;
        }

        helper.UpdateProfiles(mainCamera, profile.postProcessingProfile, profile.volumeProfile);

        // MotionBlur
        if (profile.MotionBlur_Enabled)
        {
            helper.Update_MotionBlur(true);
        }
        else
        {
            helper.Update_MotionBlur(false);
        }

        // Vignette
        helper.Update_Vignette(profile.Vignette_Enabled, profile.vignetteIntensity);


        // _ChromaticAberration
        helper.Update_ChromaticAberration(profile.Chromattic_Enabled, profile.CA_Intensity);

        helper.Update_Bloom(profile.Bloom_Enabled, profile.bIntensity, profile.bThreshould, profile.bColor, profile.dirtTexture, profile.dirtIntensity, profile.mobileOptimizedBloom, profile.bRotation);

        // Depth of Field
        helper.Update_DOF(profile.DOF_Enabled, profile.dofDistance2);

        // AO
        if (profile.AO_Enabled)
        {
            helper.Update_AO(mainCamera, true, profile.aoType, profile.aoRadius, profile.aoIntensity, profile.ambientOnly, profile.aoColor, profile.aoQuality);
        }
        else
        {
            helper.Update_AO(mainCamera, false, profile.aoType, profile.aoRadius, profile.aoIntensity, profile.ambientOnly, profile.aoColor, profile.aoQuality);
        }


        // Color Grading
        helper.Update_ColorGrading(profile.colorMode, profile.exposureIntensity, profile.contrastValue, profile.temp, profile.eyeKeyValue, profile.saturation, profile.colorGamma, profile.colorLift, profile.gamma, profile.lut);

        ////-----------------------------------------------------------------------------
        ///
        // Screen Space Reflections
        helper.Update_SSR(mainCamera, profile.SSR_Enabled, profile.ssrQuality, profile.ssrAtten, profile.ssrFade);
    }
コード例 #2
0
    void UpdatePostEffects(LB_LightingProfile profile)
    {
        if (!helper)
        {
            helper = GameObject.Find("LightingBox_Helper").GetComponent <LB_LightingBoxHelper> ();
        }

        if (!profile)
        {
            return;
        }

        helper.UpdateProfiles(mainCamera, profile.postProcessingProfile);

        // MotionBlur
        if (profile.MotionBlur_Enabled)
        {
            helper.Update_MotionBlur(true);
        }
        else
        {
            helper.Update_MotionBlur(false);
        }

        // Vignette
        helper.Update_Vignette(profile.Vignette_Enabled, profile.vignetteIntensity);


        // _ChromaticAberration
        helper.Update_ChromaticAberration(profile.Chromattic_Enabled, profile.CA_Intensity, profile.mobileOptimizedChromattic);

        // Foliage
        helper.Update_Foliage(profile.translucency, profile.ambient, profile.shadows, profile.windSpeed, profile.windScale, profile.tranColor);

        // Snow
        helper.Update_Snow(profile.snowAlbedo, profile.snowNormal, profile.snowIntensity);

        helper.Update_Bloom(profile.Bloom_Enabled, profile.bIntensity, profile.bThreshould, profile.bColor, profile.dirtTexture, profile.dirtIntensity, profile.mobileOptimizedBloom, profile.bRotation);


        // Depth of Field
        helper.Update_DOF(mainCamera, profile.DOF_Enabled, profile.dofQuality, profile.dofBlur, profile.dofRange, profile.falloff, profile.visualize);
        helper.Update_AutoFocus(mainCamera, profile.AutoFocus_Enabled, profile.DOF_Enabled, profile.afLayer, profile.afRange, profile.afBlur, profile.afSpeed, profile.afUpdate, profile.afRayLength);

        // AO
        if (profile.AO_Enabled)
        {
            helper.Update_AO(mainCamera, true, profile.aoType, profile.aoRadius, profile.aoIntensity, profile.ambientOnly, profile.aoColor, profile.aoQuality);
        }
        else
        {
            helper.Update_AO(mainCamera, false, profile.aoType, profile.aoRadius, profile.aoIntensity, profile.ambientOnly, profile.aoColor, profile.aoQuality);
        }


        // Color Grading
        helper.Update_ColorGrading(profile.colorMode, profile.exposureIntensity, profile.contrastValue, profile.temp, profile.eyeKeyValue, profile.saturation, profile.colorGamma, profile.colorLift, profile.gamma, profile.lut);

        ////-----------------------------------------------------------------------------
        ///
        // Screen Space Reflections
        helper.Update_SSR(mainCamera, profile.SSR_Enabled, profile.ssrQuality, profile.ssrAtten, profile.ssrFade);

        helper.Update_StochasticSSR(mainCamera, profile.ST_SSR_Enabled, profile.resolutionMode, profile.debugPass, profile.rayDistance, profile.screenFadeSize, profile.smoothnessRange);
    }