Ejemplo n.º 1
0
 void SetGrain()
 {
     UsedProfile = ObjectProfile.Value as PostProcessProfile;
     UsedProfile.TryGetSettings(out GrainLayer);
     if (ObjectProfile != null & UsedProfile.HasSettings <Grain>())
     {
         if (GrainLayer != null)
         {
             GrainLayer.active                = ActiveLayer.Value;              //Active AO Layer
             GrainLayer.enabled.value         = ActiveEffect.Value;             // Active AO Effect
             GrainLayer.colored.overrideState = ColoredActive.Value;            //Activate Mode
             if (ColoredActive.Value)
             {
                 GrainLayer.colored.value = Colored.Value;                                 // AO Mode selection
             }
             GrainLayer.intensity.overrideState = IntensityActive.Value;                   //Activate Mode
             if (IntensityActive.Value)
             {
                 GrainLayer.intensity.value = Intensity.Value;                            // AO Mode selection
             }
             GrainLayer.size.overrideState = SizeActive.Value;                            //Activate Mode
             if (SizeActive.Value)
             {
                 GrainLayer.size.value = Size.Value;                                  // AO Mode selection
             }
             GrainLayer.lumContrib.overrideState = LuminanceContributionActive.Value; //Activate Mode
             if (LuminanceContributionActive.Value)
             {
                 GrainLayer.lumContrib.value = LuminanceContribution.Value;                                 // AO Mode selection
             }
         }
     }
 }
 void RemoveSettingIfOption <T>(PostProcessProfile profile, Option option) where T : PostProcessEffectSettings
 {
     if (!option.Get <bool>() && profile.HasSettings <T>())
     {
         profile.RemoveSettings <T>();
     }
 }
 void SetChromaticAberration()
 {
     UsedProfile = ObjectProfile.Value as PostProcessProfile;
     UsedProfile.TryGetSettings(out AberrationLayer);
     if (ObjectProfile != null & UsedProfile.HasSettings <ChromaticAberration>())
     {
         if (AberrationLayer != null)
         {
             AberrationLayer.active                    = ActiveLayer.Value;          //Active Chromatic Aberration Layer
             AberrationLayer.enabled.value             = ActiveEffect.Value;         // Active Chromatic Aberration Effect
             AberrationLayer.spectralLut.overrideState = LutTextureActive.Value;     //Activate LUT Texture
             if (LutTextureActive.Value)
             {
                 AberrationLayer.spectralLut.value = LutTexture.Value;                                  // set LUT TExture
             }
             AberrationLayer.intensity.overrideState = IntensityActive.Value;                           //Activate intensity
             if (IntensityActive.Value)
             {
                 AberrationLayer.intensity.value = Intensity.Value;                                  // set intensity
             }
             AberrationLayer.fastMode.overrideState = FastModeActive.Value;                          //Activate Fast Mode
             if (FastModeActive.Value)
             {
                 AberrationLayer.fastMode.value = FastMode.Value;                                  // set Fast Mode
             }
         }
     }
 }
Ejemplo n.º 4
0
 void SetDoF()
 {
     UsedProfile = ObjectProfile.Value as PostProcessProfile;
     UsedProfile.TryGetSettings(out DofLayer);
     if (ObjectProfile != null & UsedProfile.HasSettings <DepthOfField>())
     {
         if (DofLayer != null)
         {
             DofLayer.active        = ActiveLayer.Value;                       //Active AO Layer
             DofLayer.enabled.value = ActiveEffect.Value;                      // Active AO Effect
             DofLayer.focusDistance.overrideState = FocusDistanceActive.Value; //Activate Focus Distance
             if (FocusDistanceActive.Value)
             {
                 DofLayer.focusDistance.value = FocusDistance.Value;                             // set distance value
             }
             DofLayer.aperture.overrideState = ApertureActive.Value;                             //Activate aperture
             if (ApertureActive.Value)
             {
                 DofLayer.aperture.value = Aperture.Value;                                  // set aperture value
             }
             DofLayer.focalLength.overrideState = FocalActive.Value;                        //Activate focal length
             if (FocalActive.Value)
             {
                 DofLayer.focalLength.value = FocalLength.Value;                                  // set focal value
             }
             DofLayer.kernelSize.overrideState = MaxBlurActive.Value;                             //Activate Max Blur Size
             if (MaxBlurActive.Value)
             {
                 DofLayer.kernelSize.value = MaxBlur;                                  // set Max Blur parameter
             }
         }
     }
 }
Ejemplo n.º 5
0
        public void UpdatePostProcessingProfile(PostProcessProfile p)
        {
            if (!p.HasSettings <PUnderwater>())
            {
                p.AddSettings <PUnderwater>();
            }

            PUnderwater underwaterSettings = p.GetSetting <PUnderwater>();

            underwaterSettings.active = EnableUnderwater;
            underwaterSettings.enabled.Override(EnableUnderwater);
            if (EnableUnderwater)
            {
                underwaterSettings.waterLevel.Override(UnderwaterWaterLevel);
                underwaterSettings.maxDepth.Override(UnderwaterMaxDepth);
                underwaterSettings.surfaceColorBoost.Override(UnderwaterSurfaceColorBoost);

                underwaterSettings.shallowFogColor.Override(UnderwaterShallowFogColor);
                underwaterSettings.deepFogColor.Override(UnderwaterDeepFogColor);
                underwaterSettings.viewDistance.Override(UnderwaterViewDistance);

                underwaterSettings.enableCaustic.Override(UnderwaterEnableCaustic);
                underwaterSettings.causticTexture.Override(UnderwaterCausticTexture);
                underwaterSettings.causticSize.Override(UnderwaterCausticSize);
                underwaterSettings.causticStrength.Override(UnderwaterCausticStrength);

                underwaterSettings.enableDistortion.Override(UnderwaterEnableDistortion);
                underwaterSettings.distortionNormalMap.Override(UnderwaterDistortionTexture);
                underwaterSettings.distortionStrength.Override(UnderwaterDistortionStrength);
                underwaterSettings.waterFlowSpeed.Override(UnderwaterWaterFlowSpeed);
            }

            if (!p.HasSettings <PWetLens>())
            {
                p.AddSettings <PWetLens>();
            }

            PWetLens wetLensSettings = p.GetSetting <PWetLens>();

            wetLensSettings.active = EnableWetLens;
            wetLensSettings.enabled.Override(EnableWetLens);
            if (EnableWetLens)
            {
                wetLensSettings.normalMap.Override(WetLensNormalMap);
                wetLensSettings.strength.Override(WetLensStrength);
            }
        }
Ejemplo n.º 6
0
        private static void DisableEffect <T>(PostProcessProfile profile) where T : PostProcessEffectSettings
        {
            if (!profile.HasSettings <T>())
            {
                return;
            }

            profile.RemoveSettings <T>();
        }
Ejemplo n.º 7
0
 void setVignette()
 {
     UsedProfile = ObjectProfile.Value as PostProcessProfile;
     UsedProfile.TryGetSettings(out VignetteLayer);
     if (ObjectProfile.Value != null & UsedProfile.HasSettings <Vignette>())
     {
         if (VignetteLayer != null)
         {
             VignetteLayer.active             = ActiveLayer.Value;                 //Active AO Layer
             VignetteLayer.enabled.value      = ActiveEffect.Value;                // Active AO Effect
             VignetteLayer.mode.overrideState = ModeActive.Value;                  //Activate mode
             if (ModeActive.Value)
             {
                 VignetteLayer.mode.value = Mode;                                 // mode
             }
             VignetteLayer.color.overrideState = ActivateColor.Value;             //Activate color
             if (ActivateColor.Value)
             {
                 VignetteLayer.color.value = VignetteColor.Value;                              // color
             }
             VignetteLayer.mask.overrideState = ActivateMask.Value;                            //Activate Mask
             if (ActivateMask.Value)
             {
                 VignetteLayer.mask.value = Mask.Value;                                 // Mask
             }
             VignetteLayer.center.overrideState = ActivateCenter.Value;                 //Activate center
             if (ActivateCenter.Value)
             {
                 VignetteLayer.center.value = Center.Value;                                 // center
             }
             VignetteLayer.intensity.overrideState = ActivateIntensity.Value;               //Activate intensity
             if (ActivateIntensity.Value)
             {
                 VignetteLayer.intensity.value = Intensity.Value;                                 // intensity
             }
             VignetteLayer.smoothness.overrideState = ActivateSmoothness.Value;                   //Activate Smoothness
             if (ActivateSmoothness.Value)
             {
                 VignetteLayer.smoothness.value = Smoothness.Value;                                 // Smoothness
             }
             VignetteLayer.roundness.overrideState = ActivateRoundness.Value;                       //Activate Roundness
             if (ActivateRoundness.Value)
             {
                 VignetteLayer.roundness.value = Roundness.Value;                                 // Roundness
             }
             VignetteLayer.rounded.overrideState = ActivateRounded.Value;                         //Activate Rounded
             if (ActivateRounded.Value)
             {
                 VignetteLayer.rounded.value = Rounded.Value;                                 // Rounded
             }
         }
     }
 }
Ejemplo n.º 8
0
        void SetSettings()
        {
            UsedProfile = ObjectProfile.Value as PostProcessProfile;
            UsedProfile.TryGetSettings(out AoLayer);
            if (ObjectProfile != null & UsedProfile.HasSettings <AmbientOcclusion>())
            {
                if (AoLayer != null)
                {
                    AoLayer.active             = ActiveLayer.Value;                 //Active AO Layer
                    AoLayer.enabled.value      = ActiveEffect.Value;                // Active AO Effect
                    AoLayer.mode.overrideState = ActiveMode.Value;                  //Activate Mode
                    if (ActiveMode.Value)
                    {
                        AoLayer.mode.value = AoType;                                 // AO Mode selection
                    }
                    AoLayer.intensity.overrideState = ActiveIntensity.Value;         //Activate Intensity modification
                    if (ActiveIntensity.Value)
                    {
                        AoLayer.intensity.value = Intensity.Value;                               //AO Intensity
                    }
                    AoLayer.radius.overrideState = ActiveRadius.Value;                           //Activate Radius modification
                    if (ActiveRadius.Value)
                    {
                        AoLayer.radius.value = Radius.Value;                                 //AO Radius
                    }

                    AoLayer.quality.overrideState = ActiveQuality.Value;
                    if (ActiveQuality.Value)
                    {
                        AoLayer.quality.value = AOQuality;                                 // AO Quality choice
                    }
                    AoLayer.color.overrideState = ActivateColor.Value;
                    if (ActivateColor.Value)
                    {
                        AoLayer.color.value = AOColor.Value;                                 // AO Color
                    }
                    AoLayer.ambientOnly.overrideState = ActivateAoOnly.Value;
                    if (ActivateAoOnly.Value)
                    {
                        AoLayer.ambientOnly.value = AmbientOnly.Value;                                 // AO Only for forward rendering
                    }
                    AoLayer.thicknessModifier.overrideState = ActivateThickness.Value;
                    if (ActivateThickness.Value)
                    {
                        AoLayer.thicknessModifier.value = ThicknessModifier.Value;                                 // AO Thikness (MultiScale Mode)
                    }
                }
            }
        }
Ejemplo n.º 9
0
 void SetLensDistortion()
 {
     UsedProfile = ObjectProfile.Value as PostProcessProfile;
     UsedProfile.TryGetSettings(out LensLayer);
     if (ObjectProfile != null & UsedProfile.HasSettings <LensDistortion>())
     {
         if (LensLayer != null)
         {
             LensLayer.active                  = ActiveLayer.Value;            //Active Lens Distortion Layer
             LensLayer.enabled.value           = ActiveEffect.Value;           // Active Lens Distortion Effect
             LensLayer.intensity.overrideState = IntensityActive.Value;        //Activate intensity
             if (IntensityActive.Value)
             {
                 LensLayer.intensity.value = Intensity.Value;                                 // intensity
             }
             LensLayer.intensityY.overrideState = YMultiplierActive.Value;                    //Activate Y intensity
             if (YMultiplierActive.Value)
             {
                 LensLayer.intensityY.value = YMultiplier.Value;                                 // Y Intensity
             }
             LensLayer.intensityX.overrideState = XMultiplierActive.Value;                       //Activate X intensity
             if (XMultiplierActive.Value)
             {
                 LensLayer.intensityX.value = XMultiplier.Value;                               // X Intensity
             }
             LensLayer.centerX.overrideState = XCenterActive.Value;                            //Activate X Center
             if (XCenterActive.Value)
             {
                 LensLayer.centerX.value = XCenter.Value;                                 // X center
             }
             LensLayer.centerY.overrideState = YCenterActive.Value;                       //Activate Y Center
             if (YCenterActive.Value)
             {
                 LensLayer.centerY.value = YCenter.Value;                                 // Y center
             }
             LensLayer.scale.overrideState = ScaleActive.Value;                           //Activate Scale
             if (ScaleActive.Value)
             {
                 LensLayer.scale.value = Scale.Value;                                 // Scale
             }
         }
     }
 }
 void SetScreenReflections()
 {
     UsedProfile = ObjectProfile.Value as PostProcessProfile;
     UsedProfile.TryGetSettings(out ScreenReflectionsLayer);
     if (ObjectProfile != null & UsedProfile.HasSettings <ScreenSpaceReflections>())
     {
         if (ScreenReflectionsLayer != null)
         {
             ScreenReflectionsLayer.active               = ActiveLayer.Value;               //Active AO Layer
             ScreenReflectionsLayer.enabled.value        = ActiveEffect.Value;              // Active AO Effect
             ScreenReflectionsLayer.preset.overrideState = PresetActive.Value;              //Activate preset
             if (PresetActive.Value)
             {
                 ScreenReflectionsLayer.preset.value = Preset;                                 // preset
             }
             ScreenReflectionsLayer.maximumIterationCount.overrideState = MaxIterationCountActive.Value;
             if (MaxIterationCountActive.Value)
             {
                 ScreenReflectionsLayer.maximumIterationCount.value = MaxIterationCount.Value;
             }
             ScreenReflectionsLayer.thickness.overrideState = ThicknessActive.Value;
             if (ThicknessActive.Value)
             {
                 ScreenReflectionsLayer.thickness.value = Thickness.Value;
             }
             ScreenReflectionsLayer.maximumMarchDistance.overrideState = MaxMarchDistanceActive.Value;                            //max march distance active
             if (MaxMarchDistanceActive.Value)
             {
                 ScreenReflectionsLayer.maximumMarchDistance.value = MaxMarchDistance.Value;                          // max march distance
             }
             ScreenReflectionsLayer.distanceFade.overrideState = DistanceFadeActive.Value;                            //distance fade active
             if (DistanceFadeActive.Value)
             {
                 ScreenReflectionsLayer.distanceFade.value = DistanceFade.Value;                              // distance fade
             }
             ScreenReflectionsLayer.vignette.overrideState = VignetteActive.Value;                            //vignette active
             if (VignetteActive.Value)
             {
                 ScreenReflectionsLayer.vignette.value = Vignette.Value;                                 // vignette
             }
         }
     }
 }
Ejemplo n.º 11
0
 void SetMotionBlur()
 {
     UsedProfile = ObjectProfile.Value as PostProcessProfile;
     UsedProfile.TryGetSettings(out MotionBlurLayer);
     if (ObjectProfile != null & UsedProfile.HasSettings <MotionBlur>())
     {
         if (MotionBlurLayer != null)
         {
             MotionBlurLayer.active        = ActiveLayer.Value;                      //Active Motion Blur Layer
             MotionBlurLayer.enabled.value = ActiveEffect.Value;                     // Active Motion Blur Effect
             MotionBlurLayer.shutterAngle.overrideState = ShutterAngleActive.Value;  //Activate shutter angle
             if (ShutterAngleActive.Value)
             {
                 MotionBlurLayer.shutterAngle.value = ShutterAngle.Value;                               // shutter angle
             }
             MotionBlurLayer.sampleCount.overrideState = SampleActive.Value;                            //Activate sample count parameter
             if (SampleActive.Value)
             {
                 Sample.Value = Mathf.RoundToInt(SampleFloat.Value);
                 MotionBlurLayer.sampleCount.value = Sample.Value;                                 // Sample quantity
             }
         }
     }
 }
Ejemplo n.º 12
0
        void setAutoExposureParameters()
        {
            UsedProfile = ObjectProfile.Value as PostProcessProfile;
            UsedProfile.TryGetSettings(out AutoExpLayer);
            if (ObjectProfile != null & UsedProfile.HasSettings <AutoExposure>())
            {
                if (AutoExpLayer != null)
                {
                    AutoExpLayer.active                  = ActiveLayer.Value;            //Active Auto Exposure Layer
                    AutoExpLayer.enabled.value           = ActiveEffect.Value;           // Active Auto Exposure Effect
                    AutoExpLayer.filtering.overrideState = FilteringActive.Value;        //Activate Focus Distance
                    if (FilteringActive.Value)
                    {
                        if (FilteringMinMax == null)
                        {
                            return;
                        }

                        Vector2 newVector2 = FilteringMinMax.Value;

                        if (!FilteringMinMax.IsNone)
                        {
                            newVector2 = FilteringMinMax.Value;
                        }
                        if (!XValue.IsNone)
                        {
                            newVector2.x = XValue.Value;
                        }
                        if (!YValue.IsNone)
                        {
                            newVector2.y = YValue.Value;
                        }

                        FilteringMinMax.Value = newVector2;

                        AutoExpLayer.filtering.value = FilteringMinMax.Value;                                  // set distance value
                    }
                    AutoExpLayer.minLuminance.overrideState = MinimumEvActive.Value;                           //Activate Min Luminance
                    if (MinimumEvActive.Value)
                    {
                        AutoExpLayer.minLuminance.value = MinimumEv.Value;                                  // set Minimum Luminance value
                    }
                    AutoExpLayer.maxLuminance.overrideState = MaximumEvActive.Value;                        //Activate Max Luminance
                    if (MaximumEvActive.Value)
                    {
                        AutoExpLayer.maxLuminance.value = MaximumEv.Value;                                  // set Maximum Luminance value
                    }
                    AutoExpLayer.keyValue.overrideState = ExposureActive.Value;                             //Activate Exposure Compensation
                    if (ExposureActive.Value)
                    {
                        AutoExpLayer.keyValue.value = ExposureCompensation.Value;                                  // set Exposure Compensation value
                    }
                    AutoExpLayer.eyeAdaptation.overrideState = AdaptationActive.Value;                             //Activate Adaptation Type
                    if (AdaptationActive.Value)
                    {
                        AutoExpLayer.eyeAdaptation.value = AdaptationType;                                  // set Adaptation Type
                    }

                    AutoExpLayer.speedUp.overrideState = SpeedUpActive.Value;                             //Activate Speed Up Parameter
                    if (SpeedUpActive.Value)
                    {
                        AutoExpLayer.speedUp.value = SpeedUp.Value;                                  // set Speed Up
                    }
                    AutoExpLayer.speedDown.overrideState = SpeedDownActive.Value;                    //Activate Speed Doawn Parameter
                    if (SpeedDownActive.Value)
                    {
                        AutoExpLayer.speedDown.value = SpeedDown.Value;                                  // set Speed Down
                    }
                }
            }
        }
Ejemplo n.º 13
0
        public void OnGUI()
        {
            if (m_Asset == null)
            {
                return;
            }

            if (m_Asset.isDirty)
            {
                RefreshEditors();
                m_Asset.isDirty = false;
            }

            bool isEditable = !VersionControl.Provider.isActive ||
                              AssetDatabase.IsOpenForEdit(m_Asset, StatusQueryOptions.UseCachedIfPossible);

            using (new EditorGUI.DisabledScope(!isEditable))
            {
                EditorGUILayout.LabelField(EditorUtilities.GetContent("Overrides"), EditorStyles.boldLabel);

                // Override list
                for (int i = 0; i < m_Editors.Count; i++)
                {
                    var    editor = m_Editors[i];
                    string title  = editor.GetDisplayTitle();
                    int    id     = i; // Needed for closure capture below

                    EditorUtilities.DrawSplitter();
                    bool displayContent = EditorUtilities.DrawHeader(
                        title,
                        editor.baseProperty,
                        editor.activeProperty,
                        editor.target,
                        () => ResetEffectOverride(editor.target.GetType(), id),
                        () => RemoveEffectOverride(id)
                        );

                    if (displayContent)
                    {
                        using (new EditorGUI.DisabledScope(!editor.activeProperty.boolValue))
                            editor.OnInternalInspectorGUI();
                    }
                }

                if (m_Editors.Count > 0)
                {
                    EditorUtilities.DrawSplitter();
                    EditorGUILayout.Space();
                }
                else
                {
                    EditorGUILayout.HelpBox("No override set on this volume.", MessageType.Info);
                }

                if (GUILayout.Button("Add effect...", EditorStyles.miniButton))
                {
                    var menu = new GenericMenu();

                    var typeMap = PostProcessManager.instance.settingsTypes;
                    foreach (var kvp in typeMap)
                    {
                        var  type   = kvp.Key;
                        var  title  = EditorUtilities.GetContent(kvp.Value.menuItem);
                        bool exists = m_Asset.HasSettings(type);

                        if (!exists)
                        {
                            menu.AddItem(title, false, () => AddEffectOverride(type));
                        }
                        else
                        {
                            menu.AddDisabledItem(title);
                        }
                    }

                    menu.ShowAsContext();
                }

                EditorGUILayout.Space();
            }
        }
Ejemplo n.º 14
0
        void SetLutParameters()
        {
            UsedProfile = ObjectProfile.Value as PostProcessProfile;
            UsedProfile.TryGetSettings(out LutLayer);
            if (ObjectProfile != null & UsedProfile.HasSettings <ColorGrading>())
            {
                if (LutLayer != null)
                {
                    LutLayer.active        = ActiveLayer.Value;                      //Active Color Grading Layer
                    LutLayer.enabled.value = ActiveEffect.Value;                     // Active Color Grading Effect

                    LutLayer.gradingMode.overrideState = ModeActive.Value;           //Activate Mode
                    if (ModeActive.Value)
                    {
                        LutLayer.gradingMode.value = ColorGradingType;                                 // Color Gradding Type
                    }
                    LutLayer.tonemapper.overrideState = ToneMappingActive.Value;                       //Activate Tone Mapping
                    if (ToneMappingActive.Value)
                    {
                        LutLayer.tonemapper.value = ToneMappingType;                                 // Tone Mapping
                    }
                    LutLayer.temperature.overrideState = TemperatureActive.Value;                    //Activate Temperature
                    if (TemperatureActive.Value)
                    {
                        LutLayer.temperature.value = Temperature.Value;                        // Temperature
                    }
                    LutLayer.tint.overrideState = TintActive.Value;                            //Activate Tint
                    if (TintActive.Value)
                    {
                        LutLayer.tint.value = Tint.Value;                                 // Tint
                    }
                    LutLayer.postExposure.overrideState = PostExposureActive.Value;       //Activate Post Exposure
                    if (PostExposureActive.Value)
                    {
                        LutLayer.postExposure.value = PostExposureEv.Value;                            // Post Exposure
                    }
                    LutLayer.colorFilter.overrideState = ColorActive.Value;                            //Activate Color
                    if (ColorActive.Value)
                    {
                        LutLayer.colorFilter.value = ColorFilter.Value;                                // Color Filter
                    }
                    LutLayer.hueShift.overrideState = HueShiftActive.Value;                            //Activate Hue Shift
                    if (HueShiftActive.Value)
                    {
                        LutLayer.hueShift.value = HueShift.Value;                                 // Hue Shift
                    }
                    LutLayer.saturation.overrideState = SaturationActive.Value;                   //Activate saturation
                    if (SaturationActive.Value)
                    {
                        LutLayer.saturation.value = Saturation.Value;                                 // saturation
                    }
                    LutLayer.contrast.overrideState = ContrastActive.Value;                           //Activate Contrast
                    if (ContrastActive.Value)
                    {
                        LutLayer.contrast.value = Contrast.Value;                                 // Contrast
                    }

                    LutLayer.lift.overrideState = LiftActive.Value;                            //Activate Lift
                    if (LiftActive.Value)
                    {
                        Vector4 LiftValue = new Vector4(LiftR.Value, LiftG.Value, LiftB.Value, LiftW.Value);
                        LutLayer.lift.value = LiftValue;                                 // Lift
                    }
                    LutLayer.gamma.overrideState = GammaActive.Value;                    //Activate Gamma
                    if (GammaActive.Value)
                    {
                        Vector4 GammaValue = new Vector4(GammaR.Value, GammaG.Value, GammaB.Value, GammaW.Value);
                        LutLayer.gamma.value = GammaValue;                                 // Gamma
                    }
                    LutLayer.gain.overrideState = GainActive.Value;                        //Activate Gain
                    if (GainActive.Value)
                    {
                        Vector4 GainValue = new Vector4(GainR.Value, GainG.Value, GainB.Value, GainW.Value);
                        LutLayer.gain.value = GainValue;                                 // Gain
                    }

                    LutLayer.externalLut.overrideState = LookupTextureActive.Value;                            //Activate External Texture
                    if (LookupTextureActive.Value)
                    {
                        LutLayer.externalLut.value = LookupTexture.Value;                                 // LUT Texture
                    }
                    LutLayer.brightness.overrideState = PostExposureActive.Value;                         //Activate Blue Channel
                    if (PostExposureActive.Value)
                    {
                        LutLayer.brightness.value = PostExposureEv.Value;                                 // Blue Channel
                    }
                    LutLayer.ldrLut.overrideState = LookupTextureActive.Value;                            //Activate Ldr Texture
                    if (LookupTextureActive.Value)
                    {
                        LutLayer.ldrLut.value = LookupTexture.Value;                                 // Ldr Texture
                    }


                    LutLayer.redCurve.overrideState = RedChannelActive.Value;                            //Activate Blue Channel
                    if (RedChannelActive.Value)
                    {
                        LutLayer.mixerRedOutRedIn.value   = RedInRedValue.Value;                             // Blue Channel
                        LutLayer.mixerRedOutGreenIn.value = GreenInRedValue.Value;                           // Blue Channel
                        LutLayer.mixerRedOutBlueIn.value  = BlueInRedValue.Value;                            // Blue Channel
                    }
                    LutLayer.greenCurve.overrideState = GreenChannelActive.Value;                            //Activate Blue Channel
                    if (GreenChannelActive.Value)
                    {
                        LutLayer.mixerGreenOutRedIn.value   = RedInGreenValue.Value;                       // Blue Channel
                        LutLayer.mixerGreenOutGreenIn.value = GreenInGreenValue.Value;                     // Blue Channel
                        LutLayer.mixerGreenOutBlueIn.value  = BlueInGreenValue.Value;                      // Blue Channel
                    }
                    LutLayer.blueCurve.overrideState = BlueChannelActive.Value;                            //Activate Blue Channel
                    if (BlueChannelActive.Value)
                    {
                        LutLayer.mixerBlueOutRedIn.value   = RedInBlueValue.Value;                               // Blue Channel
                        LutLayer.mixerBlueOutGreenIn.value = GreenInBlueValue.Value;                             // Blue Channel
                        LutLayer.mixerBlueOutBlueIn.value  = BlueInBlueValue.Value;                              // Blue Channel
                    }
                }
            }
        }
Ejemplo n.º 15
0
 void SetBloomParameteres()
 {
     UsedProfile = ObjectProfile.Value as PostProcessProfile;
     UsedProfile.TryGetSettings(out BloomLayer);
     if (ObjectProfile != null & UsedProfile.HasSettings <Bloom>())
     {
         if (BloomLayer != null)
         {
             BloomLayer.active                  = ActiveLayer.Value;            //Active Bloom Layer
             BloomLayer.enabled.value           = ActiveEffect.Value;           // Active Bloom Effect
             BloomLayer.intensity.overrideState = IntensityActive.Value;        //Activate intensity
             if (IntensityActive.Value)
             {
                 BloomLayer.intensity.value = Intensity.Value;                                  // set intensity
             }
             BloomLayer.threshold.overrideState = ThresholdActive.Value;                        //Activate Threshold
             if (ThresholdActive.Value)
             {
                 BloomLayer.threshold.value = Threshold.Value;                                  // set Threshold
             }
             BloomLayer.softKnee.overrideState = SoftKneeActive.Value;                          //Activate SoftKnee
             if (SoftKneeActive.Value)
             {
                 BloomLayer.softKnee.value = SoftKnee.Value;                                 // set SoftKnee
             }
             BloomLayer.clamp.overrideState = ClampActive.Value;                             //Activate Clamp
             if (ClampActive.Value)
             {
                 BloomLayer.clamp.value = Clamp.Value;                                  // set Clamp value
             }
             BloomLayer.diffusion.overrideState = DiffusionActive.Value;                //Activate Diffusion
             if (DiffusionActive.Value)
             {
                 BloomLayer.diffusion.value = Diffusion.Value;                                  // set Diffusion value
             }
             BloomLayer.anamorphicRatio.overrideState = AnamorphicRatioActive.Value;            //Activate Anamorphic
             if (AnamorphicRatioActive.Value)
             {
                 BloomLayer.anamorphicRatio.value = AnamorphicRatio.Value;                   // set Anamorphic value
             }
             BloomLayer.color.overrideState = ColorActive.Value;                             //Activate Color
             if (ColorActive.Value)
             {
                 BloomLayer.color.value = BloomColor.Value;                                  // set Color value
             }
             BloomLayer.fastMode.overrideState = FastModeActive.Value;                       //Activate FastMode
             if (FastModeActive.Value)
             {
                 BloomLayer.fastMode.value = FastMode.Value;                                  // set Fastmode
             }
             BloomLayer.dirtTexture.overrideState = DirtTextureActive.Value;                  //Activate Dirt Texture
             if (DirtTextureActive.Value)
             {
                 BloomLayer.dirtTexture.value = DirtTexture.Value;                                  // set Dirt Texture
             }
             BloomLayer.dirtIntensity.overrideState = DirtIntensityActive.Value;                    //Activate Dirt Texture Intensity
             if (DirtIntensityActive.Value)
             {
                 BloomLayer.dirtIntensity.value = DirtIntensity.Value;                                  // set dirt Texture Intensity
             }
         }
     }
 }