コード例 #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;
        }
コード例 #2
0
ファイル: ParameterTypes.cs プロジェクト: isoundy000/moba-1
        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;
        }
コード例 #3
0
ファイル: ParameterTypes.cs プロジェクト: B-LiTE/MemeTeam
        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			= postProcess.lensDirtBloomEffect;
            lensDirtParams.bloomBrightness 		= postProcess.lensDirtBloomBrightness;
            lensDirtParams.lensFlareEffect		= postProcess.lensDirtLensFlareEffect;
            lensDirtParams.lensFlareBrightness 	= postProcess.lensDirtLensFlareBrightness;

            DoFParams.depthFocusMode			= postProcess.depthFocusMode;
            DoFParams.maxCoCRadius				= postProcess.maxCoCRadius;
            DoFParams.quality					= postProcess.depthOfFieldSamples;
            DoFParams.visualizeFocalDistance	= postProcess.visualizeFocalDistance;
            DoFParams.pointAveragePosition		= postProcess.pointAveragePosition;
            DoFParams.pointAverageRange			= postProcess.pointAverageRange;
            DoFParams.visualizePointFocus		= postProcess.visualizePointFocus;
            DoFParams.depthAdaptionSpeed		= postProcess.depthAdaptionSpeed;
            DoFParams.focalDistance 			= postProcess.focalDistance;
            DoFParams.focalRange 				= postProcess.focalRange;
            DoFParams.useTemporal 				= postProcess.depthOfFieldTemporalSupersampling;
            DoFParams.temporalBlend				= postProcess.depthOfFieldTemporalBlend;
            DoFParams.temporalSteps 			= postProcess.depthOfFieldTemporalSteps;

            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;
        }