Exemplo n.º 1
0
        /// <summary>
        /// Update all the fog modes in the active profile
        /// </summary>
        /// <param name="fogmode"></param>
        public void UpdateAllFogType(AmbientSkiesConsts.VolumeFogType fogmode)
        {
            if (m_showDebug)
            {
                Debug.Log("Updating fog modes to " + fogmode.ToString());
            }

            //Get each skybox profile
            foreach (AmbientSkyboxProfile profile in m_skyProfiles)
            {
                //Change fog mode to Linear
                profile.fogType = fogmode;
            }
            //Get each procedural profile
            foreach (AmbientProceduralSkyboxProfile profile in m_proceduralSkyProfiles)
            {
                //Change fog mode to Linear
                profile.fogType = fogmode;
            }
            //Get each gradient profile
            foreach (AmbientGradientSkyboxProfile profile in m_gradientSkyProfiles)
            {
                //Change fog mode to Linear
                profile.fogType = fogmode;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Save current settings to default settings
        /// </summary>
        public void SaveCurrentToDefault()
        {
            defaultIsProceduralSkybox    = isProceduralSkybox;
            defaultShowSettings          = showSettings;
            defaultSkyboxExposure        = skyboxExposure;
            defaultSkyboxGroundIntensity = skyboxGroundIntensity;
            defaultSkyboxRotation        = skyboxRotation;
            defaultSkyboxPitch           = skyboxPitch;
            defaultSkyboxTint            = skyboxTint;
            defaultCustomSkybox          = customSkybox;
            defaultSunColor                = sunColor;
            defaultShadowDistance          = shadowDistance;
            defaultShadowType              = shadowType;
            defaultFogColor                = fogColor;
            defaultFogDistance             = fogDistance;
            defaultFogDensity              = fogDensity;
            defaultSunIntensity            = sunIntensity;
            defaultLWRPSunIntensity        = LWRPSunIntensity;
            defaultHDRPSunIntensity        = HDRPSunIntensity;
            defaultShadowStrength          = shadowStrength;
            defaultIndirectLightMultiplier = indirectLightMultiplier;
            defaultSunRotation             = sunRotation;
            defaultTemperature             = temperature;
            defaultUseTempature            = useTempature;

            defaultScaleHorizonObjectWithFog = scaleHorizonObjectWithFog;
            defaultHorizonSkyEnabled         = horizonSkyEnabled;
            defaultHorizonBlend      = horizonBlend;
            defaultHorizonFalloff    = horizonFalloff;
            defaultHorizonFogDensity = horizonFogDensity;
            defaultHorizonScattering = horizonScattering;
            defaultNearFogDistance   = nearFogDistance;
            defaultHorizonSize       = horizonSize;
            defaultFollowPlayer      = followPlayer;
            defaultHorizonPosition   = horizonPosition;
            defaultHorizonUpdateTime = horizonUpdateTime;
            defaultAmbientMode       = ambientMode;
            defaultSkyColor          = skyColor;
            defaultEquatorColor      = equatorColor;
            defaultGroundColor       = groundColor;
            defaultLWRPSkyColor      = lwrpSkyColor;
            defaultLWRPEquatorColor  = lwrpEquatorColor;
            defaultLWRPGroundColor   = lwrpGroundColor;
            defaultHDRISkybox        = hDRISkybox;
            defaultShadowQuality     = shadowQuality;
            defaultShadowmaskMode    = shadowmaskMode;
            defaultShadowQuality     = shadowQuality;
            defaultShadowResolution  = shadowResolution;
            defaultShadowProjection  = shadowProjection;
            defaultCascadeCount      = cascadeCount;
            defaultEnableSunDisk     = enableSunDisk;
            defaultSkyMultiplier     = skyMultiplier;

            defaultHDRPFogDistance = hDRPFogDistance;
            defaultIsGlobal        = isGlobal;
            defaultBlendDistance   = blendDistance;
            defaultWeight          = weight;
            defaultPriority        = priority;
            defaultFogType         = fogType;

            defaultHDRIExposure         = hDRIExposure;
            defaultHDRIMultiplier       = hDRIMultiplier;
            defaultHDRIUpdateMode       = hDRIUpdateMode;
            defaultHDRIRotation         = hDRIRotation;
            defaultMaxShadowDistance    = maxShadowDistance;
            defaultCascadeSplit1        = cascadeSplit1;
            defaultCascadeSplit2        = cascadeSplit2;
            defaultCascadeSplit3        = cascadeSplit3;
            defaultUseContactShadows    = useContactShadows;
            defaultContactShadowsLength = contactShadowsLength;
            defaultContactShadowsDistanceScaleFactor = contactShadowsDistanceScaleFactor;
            defaultContactShadowsMaxDistance         = contactShadowsMaxDistance;
            defaultContactShadowsFadeDistance        = contactShadowsFadeDistance;
            defaultContactShadowsSampleCount         = contactShadowsSampleCount;
            defaultContactShadowsOpacity             = contactShadowsOpacity;

            defaultUseMicroShadowing  = useMicroShadowing;
            defaultMicroShadowOpacity = microShadowOpacity;

            defaultVolumetricSingleScatteringAlbedo = volumetricSingleScatteringAlbedo;
            defaultVolumetricBaseFogDistance        = volumetricBaseFogDistance;
            defaultVolumetricBaseFogHeight          = volumetricBaseFogHeight;
            defaultVolumetricMeanHeight             = volumetricMeanHeight;
            defaultVolumetricGlobalAnisotropy       = volumetricGlobalAnisotropy;
            defaultVolumetricGlobalLightProbeDimmer = volumetricGlobalLightProbeDimmer;
            defaultVolumetricMaxFogDistance         = volumetricMaxFogDistance;
            defaultVolumetricEnableDistanceFog      = volumetricEnableDistanceFog;

            defaultVolumetricConstFogColor      = volumetricConstFogColor;
            defaultVolumetricMipFogNear         = volumetricMipFogNear;
            defaultVolumetricMipFogFar          = volumetricMipFogFar;
            defaultVolumetricMipFogMaxMip       = volumetricMipFogMaxMip;
            defaultExponentialFogDensity        = exponentialFogDensity;
            defaultExponentialBaseHeight        = exponentialBaseHeight;
            defaultExponentialHeightAttenuation = exponentialHeightAttenuation;
            defaultExponentialMaxFogDistance    = exponentialMaxFogDistance;
            defaultExponentialMipFogNear        = exponentialMipFogNear;
            defaultExponentialMipFogFar         = exponentialMipFogFar;
            defaultExponentialMipFogMaxMip      = exponentialMipFogMaxMip;
            defaultLinearFogDensity             = linearFogDensity;
            defaultLinearHeightStart            = linearHeightStart;
            defaultLinearHeightEnd         = linearHeightEnd;
            defaultLinearMaxFogDistance    = linearMaxFogDistance;
            defaultLinearMipFogNear        = linearMipFogNear;
            defaultLinearMipFogFar         = linearMipFogFar;
            defaultLinearMipFogMaxMip      = linearMipFogMaxMip;
            defaultVolumetricDistanceRange = volumetricDistanceRange;
            defaultVolumetricSliceDistributionUniformity = volumetricSliceDistributionUniformity;
            defaultIndirectDiffuseIntensity     = indirectDiffuseIntensity;
            defaultIndirectSpecularIntensity    = indirectSpecularIntensity;
            defaultEnableScreenSpaceReflections = enableScreenSpaceReflections;
            defaultScreenEdgeFadeDistance       = screenEdgeFadeDistance;
            defaultMaxNumberOfRaySteps          = maxNumberOfRaySteps;
            defaultObjectThickness              = objectThickness;
            defaultMinSmoothness                = minSmoothness;
            defaultSmoothnessFadeStart          = smoothnessFadeStart;
            defaultReflectSky                   = reflectSky;
            defaultEnableScreenSpaceRefractions = enableScreenSpaceRefractions;
            defaultScreenWeightDistance         = screenWeightDistance;
            defaultUseBakingSky                 = useBakingSky;
            defaultUseFogDensityVolume          = useFogDensityVolume;
            defaultSingleScatteringAlbedo       = singleScatteringAlbedo;
            defaultDensityVolumeFogDistance     = densityVolumeFogDistance;
            defaultFogDensityMaskTexture        = fogDensityMaskTexture;
            defaultDensityMaskTiling            = densityMaskTiling;
            defaultDensityScale                 = densityScale;
#if HDPipeline
#if UNITY_2018_3_OR_NEWER
            defaultVolumeProfile          = volumeProfile;
            defaultFogColorMode           = fogColorMode;
            defaultHDRISkyIntensityMode   = hDRISkyIntensityMode;
            defaultVolumetricFogColorMode = volumetricFogColorMode;
#endif
#endif
        }
Exemplo n.º 3
0
        /// <summary>
        /// Revert current settings back to default settings
        /// </summary>
        public void RevertToDefault()
        {
            isProceduralSkybox      = defaultIsProceduralSkybox;
            showSettings            = defaultShowSettings;
            fogColor                = defaultFogColor;
            skyboxExposure          = defaultSkyboxExposure;
            skyboxGroundIntensity   = defaultSkyboxGroundIntensity;
            skyboxRotation          = defaultSkyboxRotation;
            skyboxPitch             = defaultSkyboxPitch;
            skyboxTint              = defaultSkyboxTint;
            customSkybox            = defaultCustomSkybox;
            shadowStrength          = defaultShadowStrength;
            indirectLightMultiplier = defaultIndirectLightMultiplier;
            sunColor                = defaultSunColor;
            shadowDistance          = defaultShadowDistance;
            shadowType              = defaultShadowType;
            fogDistance             = defaultFogDistance;
            fogDensity              = defaultFogDensity;
            sunIntensity            = defaultSunIntensity;
            LWRPSunIntensity        = defaultLWRPSunIntensity;
            HDRPSunIntensity        = defaultHDRPSunIntensity;
            sunRotation             = defaultSunRotation;
            temperature             = defaultTemperature;
            useTempature            = defaultUseTempature;

            scaleHorizonObjectWithFog = defaultScaleHorizonObjectWithFog;
            horizonSkyEnabled         = defaultHorizonSkyEnabled;
            horizonBlend      = defaultHorizonBlend;
            horizonFalloff    = defaultHorizonFalloff;
            horizonFogDensity = defaultHorizonFogDensity;
            horizonScattering = defaultHorizonScattering;
            nearFogDistance   = defaultNearFogDistance;
            horizonSize       = defaultHorizonSize;
            followPlayer      = defaultFollowPlayer;
            horizonPosition   = defaultHorizonPosition;
            horizonUpdateTime = defaultHorizonUpdateTime;
            ambientMode       = defaultAmbientMode;
            skyColor          = defaultSkyColor;
            equatorColor      = defaultEquatorColor;
            groundColor       = defaultGroundColor;
            lwrpSkyColor      = defaultLWRPSkyColor;
            lwrpEquatorColor  = defaultLWRPEquatorColor;
            lwrpGroundColor   = defaultLWRPGroundColor;
            hDRISkybox        = defaultHDRISkybox;
            shadowQuality     = defaultShadowQuality;
            shadowmaskMode    = defaultShadowmaskMode;
            shadowResolution  = defaultShadowResolution;
            shadowProjection  = defaultShadowProjection;
            cascadeCount      = defaultCascadeCount;
            enableSunDisk     = defaultEnableSunDisk;
            skyMultiplier     = defaultSkyMultiplier;
            hDRPFogDistance   = defaultHDRPFogDistance;

            isGlobal      = defaultIsGlobal;
            blendDistance = defaultBlendDistance;
            weight        = defaultWeight;
            priority      = defaultPriority;

            hDRIExposure         = defaultHDRIExposure;
            hDRIMultiplier       = defaultHDRIMultiplier;
            hDRIUpdateMode       = defaultHDRIUpdateMode;
            hDRIRotation         = defaultHDRIRotation;
            maxShadowDistance    = defaultMaxShadowDistance;
            cascadeSplit1        = defaultCascadeSplit1;
            cascadeSplit2        = defaultCascadeSplit2;
            cascadeSplit3        = defaultCascadeSplit3;
            useContactShadows    = defaultUseContactShadows;
            contactShadowsLength = defaultContactShadowsLength;
            contactShadowsDistanceScaleFactor = defaultContactShadowsDistanceScaleFactor;
            contactShadowsMaxDistance         = defaultContactShadowsMaxDistance;
            contactShadowsFadeDistance        = defaultContactShadowsFadeDistance;
            contactShadowsSampleCount         = defaultContactShadowsSampleCount;
            contactShadowsOpacity             = defaultContactShadowsOpacity;

            useMicroShadowing  = defaultUseMicroShadowing;
            microShadowOpacity = defaultMicroShadowOpacity;

            volumetricSingleScatteringAlbedo = defaultVolumetricSingleScatteringAlbedo;
            volumetricBaseFogDistance        = defaultVolumetricBaseFogDistance;
            volumetricBaseFogHeight          = defaultVolumetricBaseFogHeight;
            volumetricMeanHeight             = defaultVolumetricMeanHeight;
            volumetricGlobalAnisotropy       = defaultVolumetricGlobalAnisotropy;
            volumetricGlobalLightProbeDimmer = defaultVolumetricGlobalLightProbeDimmer;
            volumetricMaxFogDistance         = defaultVolumetricMaxFogDistance;

            volumetricEnableDistanceFog = defaultVolumetricEnableDistanceFog;

            volumetricConstFogColor = defaultVolumetricConstFogColor;
            volumetricMipFogNear    = defaultVolumetricMipFogNear;
            volumetricMipFogFar     = defaultVolumetricMipFogFar;
            volumetricMipFogMaxMip  = defaultVolumetricMipFogMaxMip;
            volumetricDistanceRange = defaultVolumetricDistanceRange;
            volumetricSliceDistributionUniformity = defaultVolumetricSliceDistributionUniformity;
            exponentialBaseHeight        = defaultExponentialBaseHeight;
            exponentialHeightAttenuation = defaultExponentialHeightAttenuation;
            exponentialMaxFogDistance    = defaultExponentialMaxFogDistance;
            exponentialMipFogNear        = defaultExponentialMipFogNear;
            exponentialMipFogFar         = defaultExponentialMipFogFar;
            exponentialMipFogMaxMip      = defaultExponentialMipFogMaxMip;
            linearHeightStart            = defaultLinearHeightStart;
            linearHeightEnd              = defaultLinearHeightEnd;
            linearMaxFogDistance         = defaultLinearMaxFogDistance;
            linearMipFogNear             = defaultLinearMipFogNear;
            linearMipFogFar              = defaultLinearMipFogFar;
            linearMipFogMaxMip           = defaultLinearMipFogMaxMip;
            indirectDiffuseIntensity     = defaultIndirectDiffuseIntensity;
            indirectSpecularIntensity    = defaultIndirectSpecularIntensity;
            enableScreenSpaceReflections = defaultEnableScreenSpaceReflections;
            screenEdgeFadeDistance       = defaultScreenEdgeFadeDistance;
            maxNumberOfRaySteps          = defaultMaxNumberOfRaySteps;
            objectThickness              = defaultObjectThickness;
            minSmoothness                = defaultMinSmoothness;
            smoothnessFadeStart          = defaultSmoothnessFadeStart;
            reflectSky                   = defaultReflectSky;
            enableScreenSpaceRefractions = defaultEnableScreenSpaceRefractions;
            screenWeightDistance         = defaultScreenWeightDistance;
            useBakingSky                 = defaultUseBakingSky;
            useFogDensityVolume          = defaultUseFogDensityVolume;
            singleScatteringAlbedo       = defaultSingleScatteringAlbedo;
            densityVolumeFogDistance     = defaultDensityVolumeFogDistance;
            fogDensityMaskTexture        = defaultFogDensityMaskTexture;
            densityMaskTiling            = defaultDensityMaskTiling;
            densityScale                 = defaultDensityScale;
            linearFogDensity             = defaultLinearFogDensity;
            exponentialFogDensity        = defaultExponentialFogDensity;
            fogType = defaultFogType;

#if HDPipeline
#if UNITY_2018_3_OR_NEWER
            volumeProfile          = defaultVolumeProfile;
            volumetricFogColorMode = defaultVolumetricFogColorMode;
            fogColorMode           = defaultFogColorMode;
            hDRISkyIntensityMode   = defaultHDRISkyIntensityMode;
#endif
#endif
        }