Exemple #1
0
        public void Fill(ScionPostProcessBase postProcess)
        {
            bloom           = postProcess.bloom;
            lensDirt        = postProcess.lensDirt && (postProcess.lensDirtTexture != null);
            lensDirtTexture = postProcess.lensDirtTexture;
            bloomTexture    = null;
            dofTexture      = null;
            exposure        = postProcess.cameraMode != CameraMode.Off ? true : false;
            depthOfField    = postProcess.depthOfField;
            halfResSource   = null;                     //Done later

            bloomParams.intensity          = ScionUtility.Square(postProcess.bloomIntensity);
            bloomParams.brightness         = postProcess.bloomBrightness;
            bloomParams.distanceMultiplier = postProcess.bloomDistanceMultiplier;
            bloomParams.downsamples        = postProcess.bloomDownsamples;

            lensDirtParams.intensity  = ScionUtility.Square(postProcess.lensDirtIntensity);
            lensDirtParams.brightness = postProcess.lensDirtBrightness;

            DoFParams.depthFocusMode       = postProcess.depthFocusMode;
            DoFParams.maxCoCRadius         = postProcess.maxCoCRadius;
            DoFParams.quality              = SystemInfo.graphicsShaderLevel < 40 ? DepthOfFieldQuality.Normal : postProcess.depthOfFieldQuality;
            DoFParams.pointAveragePosition = postProcess.pointAveragePosition;
            DoFParams.pointAverageRange    = postProcess.pointAverageRange;
            DoFParams.visualizePointFocus  = postProcess.visualizePointFocus;
            DoFParams.depthAdaptionSpeed   = postProcess.depthAdaptionSpeed;
            DoFParams.focalDistance        = postProcess.focalDistance;
            DoFParams.focalRange           = postProcess.focalRange;

            colorGradingParams.colorGradingMode        = postProcess.colorGradingTex1 == null ? ColorGradingMode.Off : postProcess.colorGradingMode;
            colorGradingParams.colorGradingTex1        = postProcess.colorGradingTex1;
            colorGradingParams.colorGradingTex2        = postProcess.colorGradingTex2;
            colorGradingParams.colorGradingBlendFactor = postProcess.colorGradingBlendFactor;

            cameraParams.cameraMode           = postProcess.cameraMode;
            cameraParams.fNumber              = postProcess.fNumber;
            cameraParams.ISO                  = postProcess.ISO;
            cameraParams.shutterSpeed         = postProcess.shutterSpeed;
            cameraParams.adaptionSpeed        = postProcess.adaptionSpeed;
            cameraParams.minMaxExposure       = postProcess.minMaxExposure;
            cameraParams.exposureCompensation = postProcess.exposureCompensation;

            commonPostProcess.grainIntensity                = postProcess.grain == true ? postProcess.grainIntensity : 0.0f;
            commonPostProcess.vignetteIntensity             = postProcess.vignette == true ? postProcess.vignetteIntensity : 0.0f;
            commonPostProcess.vignetteScale                 = postProcess.vignetteScale;
            commonPostProcess.vignetteColor                 = postProcess.vignetteColor;
            commonPostProcess.chromaticAberration           = postProcess.chromaticAberration;
            commonPostProcess.chromaticAberrationDistortion = postProcess.chromaticAberrationDistortion;
            commonPostProcess.chromaticAberrationIntensity  = postProcess.chromaticAberrationIntensity;
        }
Exemple #2
0
 public void Fill(ScionPostProcess postProcess)
 {
     this.tonemapping                                     = postProcess.tonemapping;
     this.bloom                                           = postProcess.bloom;
     this.lensDirt                                        = (postProcess.lensDirt && postProcess.lensDirtTexture != null);
     this.lensDirtTexture                                 = postProcess.lensDirtTexture;
     this.bloomTexture                                    = null;
     this.dofTexture                                      = null;
     this.exposure                                        = (postProcess.cameraMode != CameraMode.Off);
     this.depthOfField                                    = postProcess.depthOfField;
     this.halfResSource                                   = null;
     this.bloomParams.intensity                           = ScionUtility.Square(postProcess.bloomIntensity);
     this.bloomParams.brightness                          = postProcess.bloomBrightness;
     this.bloomParams.downsamples                         = postProcess.bloomDownsamples;
     this.lensDirtParams.intensity                        = ScionUtility.Square(postProcess.lensDirtIntensity);
     this.lensDirtParams.brightness                       = postProcess.lensDirtBrightness;
     this.DoFParams.depthFocusMode                        = postProcess.depthFocusMode;
     this.DoFParams.maxCoCRadius                          = postProcess.maxCoCRadius;
     this.DoFParams.quality                               = ((SystemInfo.graphicsShaderLevel >= 40) ? postProcess.depthOfFieldQuality : DepthOfFieldQuality.Normal);
     this.DoFParams.pointAveragePosition                  = postProcess.pointAveragePosition;
     this.DoFParams.pointAverageRange                     = postProcess.pointAverageRange;
     this.DoFParams.visualizePointFocus                   = postProcess.visualizePointFocus;
     this.DoFParams.depthAdaptionSpeed                    = postProcess.depthAdaptionSpeed;
     this.DoFParams.focalDistance                         = postProcess.focalDistance;
     this.DoFParams.focalRange                            = postProcess.focalRange;
     this.colorGradingParams.colorGradingMode             = ((!(postProcess.colorGradingTex1 == null)) ? postProcess.colorGradingMode : ColorGradingMode.Off);
     this.colorGradingParams.colorGradingTex1             = postProcess.colorGradingTex1;
     this.colorGradingParams.colorGradingTex2             = postProcess.colorGradingTex2;
     this.colorGradingParams.colorGradingBlendFactor      = postProcess.colorGradingBlendFactor;
     this.colorGradingParams.colorGradingCompatibility    = postProcess.colorGradingCompatibility;
     this.cameraParams.cameraMode                         = postProcess.cameraMode;
     this.cameraParams.fNumber                            = postProcess.fNumber;
     this.cameraParams.ISO                                = postProcess.ISO;
     this.cameraParams.shutterSpeed                       = postProcess.shutterSpeed;
     this.cameraParams.adaptionSpeed                      = postProcess.adaptionSpeed;
     this.cameraParams.minMaxExposure                     = postProcess.minMaxExposure;
     this.cameraParams.exposureCompensation               = postProcess.exposureCompensation;
     this.commonPostProcess.grainIntensity                = ((!postProcess.grain) ? 0f : postProcess.grainIntensity);
     this.commonPostProcess.vignetteIntensity             = ((!postProcess.vignette) ? 0f : postProcess.vignetteIntensity);
     this.commonPostProcess.vignetteScale                 = postProcess.vignetteScale;
     this.commonPostProcess.vignetteColor                 = postProcess.vignetteColor;
     this.commonPostProcess.chromaticAberration           = postProcess.chromaticAberration;
     this.commonPostProcess.chromaticAberrationDistortion = postProcess.chromaticAberrationDistortion;
     this.commonPostProcess.chromaticAberrationIntensity  = postProcess.chromaticAberrationIntensity;
     this.commonPostProcess.whitePoint                    = postProcess.whitePoint;
 }
Exemple #3
0
        public void Fill(ScionPostProcessBase postProcess, bool forceFill)
        {
            if (isFilled == true && forceFill == false)
            {
                return;
            }
            isFilled = true;

            bloom           = postProcess.bloom;
            lensFlare       = postProcess.lensFlare;
            lensDirt        = postProcess.lensDirt;
            lensDirtTexture = postProcess.lensDirtTexture;
            bloomTexture    = null;
            dofTexture      = null;
            exposure        = postProcess.cameraMode != CameraMode.Off ? true : false;
            depthOfField    = postProcess.depthOfField;
            halfResSource   = null;                     //Done later

            glareParams.intensity          = ScionUtility.Square(postProcess.bloomIntensity);
            glareParams.brightness         = postProcess.bloomBrightness;
            glareParams.distanceMultiplier = postProcess.bloomDistanceMultiplier;
            glareParams.downsamples        = postProcess.bloomDownsamples;

            lensFlareParams.ghostSamples     = postProcess.lensFlareGhostSamples;
            lensFlareParams.ghostIntensity   = postProcess.lensFlareGhostIntensity;
            lensFlareParams.ghostDispersal   = postProcess.lensFlareGhostDispersal;
            lensFlareParams.ghostDistortion  = postProcess.lensFlareGhostDistortion;
            lensFlareParams.ghostEdgeFade    = postProcess.lensFlareGhostEdgeFade;
            lensFlareParams.haloIntensity    = postProcess.lensFlareHaloIntensity;
            lensFlareParams.haloWidth        = postProcess.lensFlareHaloWidth;
            lensFlareParams.haloDistortion   = postProcess.lensFlareHaloDistortion;
            lensFlareParams.starUVScale      = postProcess.lensFlareDiffractionUVScale;
            lensFlareParams.starTexture      = postProcess.lensFlareDiffractionTexture;
            lensFlareParams.lensColorTexture = postProcess.lensFlareLensColorTexture;
            lensFlareParams.blurSamples      = postProcess.lensFlareBlurSamples;
            lensFlareParams.blurStrength     = postProcess.lensFlareBlurStrength;
            lensFlareParams.downsamples      = postProcess.lensFlareDownsamples;

            //lensDirtParams.bloomEffect		= ScionUtility.Square(postProcess.lensDirtBloomEffect);
            lensDirtParams.bloomEffect         = postProcess.lensDirtBloomEffect;
            lensDirtParams.bloomBrightness     = postProcess.lensDirtBloomBrightness;
            lensDirtParams.lensFlareEffect     = postProcess.lensDirtLensFlareEffect;
            lensDirtParams.lensFlareBrightness = postProcess.lensDirtLensFlareBrightness;

            DoFParams.depthFocusMode       = postProcess.depthFocusMode;
            DoFParams.maxCoCRadius         = postProcess.maxCoCRadius;
            DoFParams.quality              = SystemInfo.graphicsShaderLevel < 40 ? DepthOfFieldQuality.Normal : postProcess.depthOfFieldQuality;
            DoFParams.pointAveragePosition = postProcess.pointAveragePosition;
            DoFParams.pointAverageRange    = postProcess.pointAverageRange;
            DoFParams.visualizePointFocus  = postProcess.visualizePointFocus;
            DoFParams.depthAdaptionSpeed   = postProcess.depthAdaptionSpeed;
            DoFParams.focalDistance        = postProcess.focalDistance;
            DoFParams.focalRange           = postProcess.focalRange;

            colorGradingParams.colorGradingMode        = postProcess.colorGradingTex1 == null ? ColorGradingMode.Off : postProcess.colorGradingMode;
            colorGradingParams.colorGradingTex1        = postProcess.colorGradingTex1;
            colorGradingParams.colorGradingTex2        = postProcess.colorGradingTex2;
            colorGradingParams.colorGradingBlendFactor = postProcess.colorGradingBlendFactor;

            cameraParams.cameraMode           = postProcess.cameraMode;
            cameraParams.fNumber              = postProcess.fNumber;
            cameraParams.ISO                  = postProcess.ISO;
            cameraParams.shutterSpeed         = postProcess.shutterSpeed;
            cameraParams.adaptionSpeed        = postProcess.adaptionSpeed;
            cameraParams.minMaxExposure       = postProcess.minMaxExposure;
            cameraParams.exposureCompensation = postProcess.exposureCompensation;

            commonPostProcess.grainIntensity                = postProcess.grain == true ? postProcess.grainIntensity : 0.0f;
            commonPostProcess.vignetteIntensity             = postProcess.vignette == true ? postProcess.vignetteIntensity : 0.0f;
            commonPostProcess.vignetteScale                 = postProcess.vignetteScale;
            commonPostProcess.vignetteColor                 = postProcess.vignetteColor;
            commonPostProcess.chromaticAberration           = postProcess.chromaticAberration;
            commonPostProcess.chromaticAberrationDistortion = postProcess.chromaticAberrationDistortion;
            commonPostProcess.chromaticAberrationIntensity  = postProcess.chromaticAberrationIntensity;
        }