private void Awake() { BeautifyEffect.Beautify beautify = GetComponent <BeautifyEffect.Beautify>(); if (null != beautify) { beautify.enabled = true; } }
public void ApplyUpdates() { #if SPACE_MAIN if (_beautify == null) { _beautify = Camera.main.GetComponent <BeautifyEffect.Beautify>(); } if (_beautify != null) { _beautify.enabled = enabled; _beautify.sharpen = settings.Amount; } #endif }
void OnEnable() { titleColor = EditorGUIUtility.isProSkin ? new Color(0.52f, 0.66f, 0.9f) : new Color(0.12f, 0.16f, 0.4f); _headerTexture = Resources.Load <Texture2D> ("beautifyHeader"); _effect = (Beautify)target; }
/// <summary> /// Replaces profile settings with current Beautify configuration /// </summary> public void Save(Beautify b) { // dither dither = b.dither; ditherDepth = b.ditherDepth; // sharpen sharpenMinDepth = b.sharpenMinDepth; sharpenMaxDepth = b.sharpenMaxDepth; sharpenMinMaxDepthFallOff = b.sharpenMinMaxDepthFallOff; sharpen = b.sharpen; sharpenDepthThreshold = b.sharpenDepthThreshold; tintColor = b.tintColor; sharpenRelaxation = b.sharpenRelaxation; sharpenClamp = b.sharpenClamp; sharpenMotionSensibility = b.sharpenMotionSensibility; // aa antialiasStrength = b.antialiasStrength; antialiasDepthThreshold = b.antialiasDepthThreshold; // color grading saturate = b.saturate; contrast = b.contrast; brightness = b.brightness; daltonize = b.daltonize; // vignetting vignetting = b.vignetting; vignettingColor = b.vignettingColor; vignettingFade = b.vignettingFade; vignettingCircularShape = b.vignettingCircularShape; vignettingMask = b.vignettingMask; vignettingAspectRatio = b.vignettingAspectRatio; vignettingBlink = b.vignettingBlink; // frame frame = b.frame; frameColor = b.frameColor; frameMask = b.frameMask; // lut lut = b.lut; lutTexture = b.lutTexture; lutIntensity = b.lutIntensity; // night vision nightVision = b.nightVision; nightVisionColor = b.nightVisionColor; // outline outline = b.outline; outlineColor = b.outlineColor; // thermal vision thermalVision = b.thermalVision; // lens dirt lensDirt = b.lensDirt; lensDirtThreshold = b.lensDirtThreshold; lensDirtIntensity = b.lensDirtIntensity; lensDirtTexture = b.lensDirtTexture; // bloom bloom = b.bloom; bloomCullingMask = b.bloomCullingMask; bloomLayerMaskDownsampling = b.bloomLayerMaskDownsampling; bloomIntensity = b.bloomIntensity; bloomMaxBrightness = b.bloomMaxBrightness; bloomBoost0 = b.bloomBoost0; bloomBoost1 = b.bloomBoost1; bloomBoost2 = b.bloomBoost2; bloomBoost3 = b.bloomBoost3; bloomBoost4 = b.bloomBoost4; bloomBoost5 = b.bloomBoost5; bloomAntiflicker = b.bloomAntiflicker; bloomUltra = b.bloomUltra; bloomThreshold = b.bloomThreshold; bloomCustomize = b.bloomCustomize; bloomWeight0 = b.bloomWeight0; bloomWeight1 = b.bloomWeight1; bloomWeight2 = b.bloomWeight2; bloomWeight3 = b.bloomWeight3; bloomWeight4 = b.bloomWeight4; bloomWeight5 = b.bloomWeight5; bloomBlur = b.bloomBlur; bloomDepthAtten = b.bloomDepthAtten; bloomLayerZBias = b.bloomLayerZBias; // anamorphic flares anamorphicFlares = b.anamorphicFlares; anamorphicFlaresIntensity = b.anamorphicFlaresIntensity; anamorphicFlaresAntiflicker = b.anamorphicFlaresAntiflicker; anamorphicFlaresUltra = b.anamorphicFlaresUltra; anamorphicFlaresThreshold = b.anamorphicFlaresThreshold; anamorphicFlaresSpread = b.anamorphicFlaresSpread; anamorphicFlaresVertical = b.anamorphicFlaresVertical; anamorphicFlaresTint = b.anamorphicFlaresTint; anamorphicFlaresBlur = b.anamorphicFlaresBlur; // dof depthOfField = b.depthOfField; depthOfFieldTransparencySupport = b.depthOfFieldTransparencySupport; depthOfFieldTargetFocus = b.depthOfFieldTargetFocus; depthOfFieldAutofocus = b.depthOfFieldAutofocus; depthofFieldAutofocusViewportPoint = b.depthofFieldAutofocusViewportPoint; depthOfFieldAutofocusLayerMask = b.depthOfFieldAutofocusLayerMask; depthOfFieldAutofocusMinDistance = b.depthOfFieldAutofocusMinDistance; depthOfFieldAutofocusMaxDistance = b.depthOfFieldAutofocusMaxDistance; depthOfFieldExclusionLayerMask = b.depthOfFieldExclusionLayerMask; depthOfFieldExclusionLayerMaskDownsampling = b.depthOfFieldExclusionLayerMaskDownsampling; depthOfFieldTransparencySupportDownsampling = b.depthOfFieldTransparencySupportDownsampling; depthOfFieldExclusionBias = b.depthOfFieldExclusionBias; depthOfFieldDistance = b.depthOfFieldDistance; depthOfFieldFocusSpeed = b.depthOfFieldFocusSpeed; depthOfFieldDownsampling = b.depthOfFieldDownsampling; depthOfFieldMaxSamples = b.depthOfFieldMaxSamples; depthOfFieldFocalLength = b.depthOfFieldFocalLength; depthOfFieldAperture = b.depthOfFieldAperture; depthOfFieldForegroundBlur = b.depthOfFieldForegroundBlur; depthOfFieldForegroundBlurHQ = b.depthOfFieldForegroundBlurHQ; depthOfFieldForegroundDistance = b.depthOfFieldForegroundDistance; depthOfFieldBokeh = b.depthOfFieldBokeh; depthOfFieldBokehThreshold = b.depthOfFieldBokehThreshold; depthOfFieldBokehIntensity = b.depthOfFieldBokehIntensity; depthOfFieldMaxBrightness = b.depthOfFieldMaxBrightness; depthOfFieldMaxDistance = b.depthOfFieldMaxDistance; depthOfFieldFilterMode = b.depthOfFieldFilterMode; depthOfFieldTransparencyLayerMask = b.depthOfFieldTransparencyLayerMask; // ea eyeAdaptation = b.eyeAdaptation; eyeAdaptationMaxExposure = b.eyeAdaptationMaxExposure; eyeAdaptationMinExposure = b.eyeAdaptationMinExposure; eyeAdaptationSpeedToDark = b.eyeAdaptationSpeedToDark; eyeAdaptationSpeedToLight = b.eyeAdaptationSpeedToLight; // purkinje purkinje = b.purkinje; purkinjeAmount = b.purkinjeAmount; purkinjeLuminanceThreshold = b.purkinjeLuminanceThreshold; // tonemap tonemap = b.tonemap; // flares sunFlares = b.sunFlares; sunFlaresIntensity = b.sunFlaresIntensity; sunFlaresSolarWindSpeed = b.sunFlaresSolarWindSpeed; sunFlaresTint = b.sunFlaresTint; sunFlaresDownsampling = b.sunFlaresDownsampling; sunFlaresSunIntensity = b.sunFlaresSunIntensity; sunFlaresSunDiskSize = b.sunFlaresSunDiskSize; sunFlaresSunRayDiffractionIntensity = b.sunFlaresSunRayDiffractionIntensity; sunFlaresSunRayDiffractionThreshold = b.sunFlaresSunRayDiffractionThreshold; sunFlaresCoronaRays1Length = b.sunFlaresCoronaRays1Length; sunFlaresCoronaRays1Spread = b.sunFlaresCoronaRays1Spread; sunFlaresCoronaRays1AngleOffset = b.sunFlaresCoronaRays1AngleOffset; sunFlaresCoronaRays1Streaks = b.sunFlaresCoronaRays1Streaks; sunFlaresCoronaRays2Length = b.sunFlaresCoronaRays2Length; sunFlaresCoronaRays2Spread = b.sunFlaresCoronaRays2Spread; sunFlaresCoronaRays2AngleOffset = b.sunFlaresCoronaRays2AngleOffset; sunFlaresCoronaRays2Streaks = b.sunFlaresCoronaRays2Streaks; sunFlaresGhosts1Size = b.sunFlaresGhosts1Size; sunFlaresGhosts1Offset = b.sunFlaresGhosts1Offset; sunFlaresGhosts1Brightness = b.sunFlaresGhosts1Brightness; sunFlaresGhosts2Size = b.sunFlaresGhosts2Size; sunFlaresGhosts2Offset = b.sunFlaresGhosts2Offset; sunFlaresGhosts2Brightness = b.sunFlaresGhosts2Brightness; sunFlaresGhosts3Size = b.sunFlaresGhosts3Size; sunFlaresGhosts3Offset = b.sunFlaresGhosts3Offset; sunFlaresGhosts3Brightness = b.sunFlaresGhosts3Brightness; sunFlaresGhosts4Size = b.sunFlaresGhosts4Size; sunFlaresGhosts4Offset = b.sunFlaresGhosts4Offset; sunFlaresGhosts4Brightness = b.sunFlaresGhosts4Brightness; sunFlaresHaloOffset = b.sunFlaresHaloOffset; sunFlaresHaloAmplitude = b.sunFlaresHaloAmplitude; sunFlaresHaloIntensity = b.sunFlaresHaloIntensity; sunFlaresRotationDeadZone = b.sunFlaresRotationDeadZone; // blur blur = b.blur; blurIntensity = b.blurIntensity; // pixelate pixelateAmount = b.pixelateAmount; pixelateDownscale = b.pixelateDownscale; }
/// <summary> /// Applies profile settings /// </summary> public void Load(Beautify b) { // dither b.dither = dither; b.ditherDepth = ditherDepth; // sharpen b.sharpenMinDepth = sharpenMinDepth; b.sharpenMaxDepth = sharpenMaxDepth; b.sharpenMinMaxDepthFallOff = sharpenMinMaxDepthFallOff; b.sharpen = sharpen; b.sharpenDepthThreshold = sharpenDepthThreshold; b.tintColor = tintColor; b.sharpenRelaxation = sharpenRelaxation; b.sharpenClamp = sharpenClamp; b.sharpenMotionSensibility = sharpenMotionSensibility; // aa b.antialiasStrength = antialiasStrength; b.antialiasDepthThreshold = antialiasDepthThreshold; // color grading b.saturate = saturate; b.contrast = contrast; b.brightness = brightness; b.daltonize = daltonize; // vignetting b.vignetting = vignetting; b.vignettingColor = vignettingColor; b.vignettingFade = vignettingFade; b.vignettingCircularShape = vignettingCircularShape; b.vignettingAspectRatio = vignettingAspectRatio; b.vignettingBlink = vignettingBlink; b.vignettingMask = vignettingMask; // frame b.frame = frame; b.frameColor = frameColor; b.frameMask = frameMask; // lut b.lut = lut; b.lutTexture = lutTexture; b.lutIntensity = lutIntensity; // night vision b.nightVision = nightVision; b.nightVisionColor = nightVisionColor; // outline b.outline = outline; b.outlineColor = outlineColor; // thermal vision b.thermalVision = thermalVision; // lens dirt b.lensDirt = lensDirt; b.lensDirtThreshold = lensDirtThreshold; b.lensDirtIntensity = lensDirtIntensity; b.lensDirtTexture = lensDirtTexture; // bloom b.bloom = bloom; b.bloomCullingMask = bloomCullingMask; b.bloomLayerMaskDownsampling = bloomLayerMaskDownsampling; b.bloomIntensity = bloomIntensity; b.bloomMaxBrightness = bloomMaxBrightness; b.bloomBoost0 = bloomBoost0; b.bloomBoost1 = bloomBoost1; b.bloomBoost2 = bloomBoost2; b.bloomBoost3 = bloomBoost3; b.bloomBoost4 = bloomBoost4; b.bloomBoost5 = bloomBoost5; b.bloomAntiflicker = bloomAntiflicker; b.bloomUltra = bloomUltra; b.bloomThreshold = bloomThreshold; b.bloomCustomize = bloomCustomize; b.bloomWeight0 = bloomWeight0; b.bloomWeight1 = bloomWeight1; b.bloomWeight2 = bloomWeight2; b.bloomWeight3 = bloomWeight3; b.bloomWeight4 = bloomWeight4; b.bloomWeight5 = bloomWeight5; b.bloomBlur = bloomBlur; b.bloomDepthAtten = bloomDepthAtten; b.bloomLayerZBias = bloomLayerZBias; // anamorphic flares b.anamorphicFlares = anamorphicFlares; b.anamorphicFlaresIntensity = anamorphicFlaresIntensity; b.anamorphicFlaresAntiflicker = anamorphicFlaresAntiflicker; b.anamorphicFlaresUltra = anamorphicFlaresUltra; b.anamorphicFlaresThreshold = anamorphicFlaresThreshold; b.anamorphicFlaresSpread = anamorphicFlaresSpread; b.anamorphicFlaresVertical = anamorphicFlaresVertical; b.anamorphicFlaresTint = anamorphicFlaresTint; b.anamorphicFlaresBlur = anamorphicFlaresBlur; // dof b.depthOfField = depthOfField; b.depthOfFieldTransparencySupport = depthOfFieldTransparencySupport; b.depthOfFieldTargetFocus = depthOfFieldTargetFocus; b.depthOfFieldAutofocus = depthOfFieldAutofocus; b.depthofFieldAutofocusViewportPoint = depthofFieldAutofocusViewportPoint; b.depthOfFieldAutofocusLayerMask = depthOfFieldAutofocusLayerMask; b.depthOfFieldAutofocusMinDistance = depthOfFieldAutofocusMinDistance; b.depthOfFieldAutofocusMaxDistance = depthOfFieldAutofocusMaxDistance; b.depthOfFieldExclusionLayerMask = depthOfFieldExclusionLayerMask; b.depthOfFieldExclusionLayerMaskDownsampling = depthOfFieldExclusionLayerMaskDownsampling; b.depthOfFieldTransparencySupportDownsampling = depthOfFieldTransparencySupportDownsampling; b.depthOfFieldExclusionBias = depthOfFieldExclusionBias; b.depthOfFieldDistance = depthOfFieldDistance; b.depthOfFieldFocusSpeed = depthOfFieldFocusSpeed; b.depthOfFieldDownsampling = depthOfFieldDownsampling; b.depthOfFieldMaxSamples = depthOfFieldMaxSamples; b.depthOfFieldFocalLength = depthOfFieldFocalLength; b.depthOfFieldAperture = depthOfFieldAperture; b.depthOfFieldForegroundBlur = depthOfFieldForegroundBlur; b.depthOfFieldForegroundBlurHQ = depthOfFieldForegroundBlurHQ; b.depthOfFieldForegroundDistance = depthOfFieldForegroundDistance; b.depthOfFieldBokeh = depthOfFieldBokeh; b.depthOfFieldBokehThreshold = depthOfFieldBokehThreshold; b.depthOfFieldBokehIntensity = depthOfFieldBokehIntensity; b.depthOfFieldMaxBrightness = depthOfFieldMaxBrightness; b.depthOfFieldMaxDistance = depthOfFieldMaxDistance; b.depthOfFieldFilterMode = depthOfFieldFilterMode; b.depthOfFieldTransparencyLayerMask = depthOfFieldTransparencyLayerMask; // ea b.eyeAdaptation = eyeAdaptation; b.eyeAdaptationMaxExposure = eyeAdaptationMaxExposure; b.eyeAdaptationMinExposure = eyeAdaptationMinExposure; b.eyeAdaptationSpeedToDark = eyeAdaptationSpeedToDark; b.eyeAdaptationSpeedToLight = eyeAdaptationSpeedToLight; // purkinje b.purkinje = purkinje; b.purkinjeAmount = purkinjeAmount; b.purkinjeLuminanceThreshold = purkinjeLuminanceThreshold; // tonemap b.tonemap = tonemap; // flares b.sunFlares = sunFlares; b.sunFlaresIntensity = sunFlaresIntensity; b.sunFlaresSolarWindSpeed = sunFlaresSolarWindSpeed; b.sunFlaresTint = sunFlaresTint; b.sunFlaresDownsampling = sunFlaresDownsampling; b.sunFlaresSunIntensity = sunFlaresSunIntensity; b.sunFlaresSunDiskSize = sunFlaresSunDiskSize; b.sunFlaresSunRayDiffractionIntensity = sunFlaresSunRayDiffractionIntensity; b.sunFlaresSunRayDiffractionThreshold = sunFlaresSunRayDiffractionThreshold; b.sunFlaresCoronaRays1Length = sunFlaresCoronaRays1Length; b.sunFlaresCoronaRays1Spread = sunFlaresCoronaRays1Spread; b.sunFlaresCoronaRays1AngleOffset = sunFlaresCoronaRays1AngleOffset; b.sunFlaresCoronaRays1Streaks = sunFlaresCoronaRays1Streaks; b.sunFlaresCoronaRays2Length = sunFlaresCoronaRays2Length; b.sunFlaresCoronaRays2Spread = sunFlaresCoronaRays2Spread; b.sunFlaresCoronaRays2AngleOffset = sunFlaresCoronaRays2AngleOffset; b.sunFlaresCoronaRays2Streaks = sunFlaresCoronaRays2Streaks; b.sunFlaresGhosts1Size = sunFlaresGhosts1Size; b.sunFlaresGhosts1Offset = sunFlaresGhosts1Offset; b.sunFlaresGhosts1Brightness = sunFlaresGhosts1Brightness; b.sunFlaresGhosts2Size = sunFlaresGhosts2Size; b.sunFlaresGhosts2Offset = sunFlaresGhosts2Offset; b.sunFlaresGhosts2Brightness = sunFlaresGhosts2Brightness; b.sunFlaresGhosts3Size = sunFlaresGhosts3Size; b.sunFlaresGhosts3Offset = sunFlaresGhosts3Offset; b.sunFlaresGhosts3Brightness = sunFlaresGhosts3Brightness; b.sunFlaresGhosts4Size = sunFlaresGhosts4Size; b.sunFlaresGhosts4Offset = sunFlaresGhosts4Offset; b.sunFlaresGhosts4Brightness = sunFlaresGhosts4Brightness; b.sunFlaresHaloOffset = sunFlaresHaloOffset; b.sunFlaresHaloAmplitude = sunFlaresHaloAmplitude; b.sunFlaresHaloIntensity = sunFlaresHaloIntensity; b.sunFlaresRotationDeadZone = sunFlaresRotationDeadZone; // blur b.blur = blur; b.blurIntensity = blurIntensity; // pixelate b.pixelateAmount = pixelateAmount; b.pixelateDownscale = pixelateDownscale; }