testss
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Bloom")]
|
||||
public sealed class Bloom : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Filters out pixels under this level of brightness. Value is in gamma-space.")]
|
||||
public MinFloatParameter threshold = new MinFloatParameter(0.9f, 0f);
|
||||
|
||||
[Tooltip("Strength of the bloom filter.")]
|
||||
public MinFloatParameter intensity = new MinFloatParameter(0f, 0f);
|
||||
|
||||
[Tooltip("Changes the extent of veiling effects.")]
|
||||
public ClampedFloatParameter scatter = new ClampedFloatParameter(0.7f, 0f, 1f);
|
||||
|
||||
[Tooltip("Clamps pixels to control the bloom amount.")]
|
||||
public MinFloatParameter clamp = new MinFloatParameter(65472f, 0f);
|
||||
|
||||
[Tooltip("Global tint of the bloom filter.")]
|
||||
public ColorParameter tint = new ColorParameter(Color.white, false, false, true);
|
||||
|
||||
[Tooltip("Use bicubic sampling instead of bilinear sampling for the upsampling passes. This is slightly more expensive but helps getting smoother visuals.")]
|
||||
public BoolParameter highQualityFiltering = new BoolParameter(false);
|
||||
|
||||
[Tooltip("The number of final iterations to skip in the effect processing sequence.")]
|
||||
public ClampedIntParameter skipIterations = new ClampedIntParameter(1, 0, 16);
|
||||
|
||||
[Tooltip("Dirtiness texture to add smudges or dust to the bloom effect.")]
|
||||
public TextureParameter dirtTexture = new TextureParameter(null);
|
||||
|
||||
[Tooltip("Amount of dirtiness.")]
|
||||
public MinFloatParameter dirtIntensity = new MinFloatParameter(0f, 0f);
|
||||
|
||||
public bool IsActive() => intensity.value > 0f;
|
||||
|
||||
public bool IsTileCompatible() => false;
|
||||
}
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Channel Mixer")]
|
||||
public sealed class ChannelMixer : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Modify influence of the red channel in the overall mix.")]
|
||||
public ClampedFloatParameter redOutRedIn = new ClampedFloatParameter(100f, -200f, 200f);
|
||||
|
||||
[Tooltip("Modify influence of the green channel in the overall mix.")]
|
||||
public ClampedFloatParameter redOutGreenIn = new ClampedFloatParameter(0f, -200f, 200f);
|
||||
|
||||
[Tooltip("Modify influence of the blue channel in the overall mix.")]
|
||||
public ClampedFloatParameter redOutBlueIn = new ClampedFloatParameter(0f, -200f, 200f);
|
||||
|
||||
[Tooltip("Modify influence of the red channel in the overall mix.")]
|
||||
public ClampedFloatParameter greenOutRedIn = new ClampedFloatParameter(0f, -200f, 200f);
|
||||
|
||||
[Tooltip("Modify influence of the green channel in the overall mix.")]
|
||||
public ClampedFloatParameter greenOutGreenIn = new ClampedFloatParameter(100f, -200f, 200f);
|
||||
|
||||
[Tooltip("Modify influence of the blue channel in the overall mix.")]
|
||||
public ClampedFloatParameter greenOutBlueIn = new ClampedFloatParameter(0f, -200f, 200f);
|
||||
|
||||
[Tooltip("Modify influence of the red channel in the overall mix.")]
|
||||
public ClampedFloatParameter blueOutRedIn = new ClampedFloatParameter(0f, -200f, 200f);
|
||||
|
||||
[Tooltip("Modify influence of the green channel in the overall mix.")]
|
||||
public ClampedFloatParameter blueOutGreenIn = new ClampedFloatParameter(0f, -200f, 200f);
|
||||
|
||||
[Tooltip("Modify influence of the blue channel in the overall mix.")]
|
||||
public ClampedFloatParameter blueOutBlueIn = new ClampedFloatParameter(100f, -200f, 200f);
|
||||
|
||||
public bool IsActive()
|
||||
{
|
||||
return redOutRedIn.value != 100f
|
||||
|| redOutGreenIn.value != 0f
|
||||
|| redOutBlueIn.value != 0f
|
||||
|| greenOutRedIn.value != 0f
|
||||
|| greenOutGreenIn.value != 100f
|
||||
|| greenOutBlueIn.value != 0f
|
||||
|| blueOutRedIn.value != 0f
|
||||
|| blueOutGreenIn.value != 0f
|
||||
|| blueOutBlueIn.value != 100f;
|
||||
}
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Chromatic Aberration")]
|
||||
public sealed class ChromaticAberration : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Amount of tangential distortion.")]
|
||||
public ClampedFloatParameter intensity = new ClampedFloatParameter(0f, 0f, 1f);
|
||||
|
||||
public bool IsActive() => intensity.value > 0f;
|
||||
|
||||
public bool IsTileCompatible() => false;
|
||||
}
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Color Adjustments")]
|
||||
public sealed class ColorAdjustments : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Adjusts the overall exposure of the scene in EV100. This is applied after HDR effect and right before tonemapping so it won't affect previous effects in the chain.")]
|
||||
public FloatParameter postExposure = new FloatParameter(0f);
|
||||
|
||||
[Tooltip("Expands or shrinks the overall range of tonal values.")]
|
||||
public ClampedFloatParameter contrast = new ClampedFloatParameter(0f, -100f, 100f);
|
||||
|
||||
[Tooltip("Tint the render by multiplying a color.")]
|
||||
public ColorParameter colorFilter = new ColorParameter(Color.white, true, false, true);
|
||||
|
||||
[Tooltip("Shift the hue of all colors.")]
|
||||
public ClampedFloatParameter hueShift = new ClampedFloatParameter(0f, -180f, 180f);
|
||||
|
||||
[Tooltip("Pushes the intensity of all colors.")]
|
||||
public ClampedFloatParameter saturation = new ClampedFloatParameter(0f, -100f, 100f);
|
||||
|
||||
public bool IsActive()
|
||||
{
|
||||
return postExposure.value != 0f
|
||||
|| contrast.value != 0f
|
||||
|| colorFilter != Color.white
|
||||
|| hueShift != 0f
|
||||
|| saturation != 0f;
|
||||
}
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Color Curves")]
|
||||
public sealed class ColorCurves : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
public TextureCurveParameter master = new TextureCurveParameter(new TextureCurve(new[] { new Keyframe(0f, 0f, 1f, 1f), new Keyframe(1f, 1f, 1f, 1f) }, 0f, false, new Vector2(0f, 1f)));
|
||||
public TextureCurveParameter red = new TextureCurveParameter(new TextureCurve(new[] { new Keyframe(0f, 0f, 1f, 1f), new Keyframe(1f, 1f, 1f, 1f) }, 0f, false, new Vector2(0f, 1f)));
|
||||
public TextureCurveParameter green = new TextureCurveParameter(new TextureCurve(new[] { new Keyframe(0f, 0f, 1f, 1f), new Keyframe(1f, 1f, 1f, 1f) }, 0f, false, new Vector2(0f, 1f)));
|
||||
public TextureCurveParameter blue = new TextureCurveParameter(new TextureCurve(new[] { new Keyframe(0f, 0f, 1f, 1f), new Keyframe(1f, 1f, 1f, 1f) }, 0f, false, new Vector2(0f, 1f)));
|
||||
|
||||
public TextureCurveParameter hueVsHue = new TextureCurveParameter(new TextureCurve(new Keyframe[] {}, 0.5f, true, new Vector2(0f, 1f)));
|
||||
public TextureCurveParameter hueVsSat = new TextureCurveParameter(new TextureCurve(new Keyframe[] {}, 0.5f, true, new Vector2(0f, 1f)));
|
||||
public TextureCurveParameter satVsSat = new TextureCurveParameter(new TextureCurve(new Keyframe[] {}, 0.5f, false, new Vector2(0f, 1f)));
|
||||
public TextureCurveParameter lumVsSat = new TextureCurveParameter(new TextureCurve(new Keyframe[] {}, 0.5f, false, new Vector2(0f, 1f)));
|
||||
|
||||
public bool IsActive() => true;
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using UnityEngine.Experimental.Rendering;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Color Lookup")]
|
||||
public sealed class ColorLookup : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("A custom 2D texture lookup table to apply.")]
|
||||
public TextureParameter texture = new TextureParameter(null);
|
||||
|
||||
[Tooltip("How much of the lookup texture will contribute to the color grading effect.")]
|
||||
public ClampedFloatParameter contribution = new ClampedFloatParameter(1f, 0f, 1f);
|
||||
|
||||
public bool IsActive() => contribution.value > 0f && ValidateLUT();
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
|
||||
public bool ValidateLUT()
|
||||
{
|
||||
var asset = UniversalRenderPipeline.asset;
|
||||
if (asset == null || texture.value == null)
|
||||
return false;
|
||||
|
||||
int lutSize = asset.colorGradingLutSize;
|
||||
if (texture.value.height != lutSize)
|
||||
return false;
|
||||
|
||||
bool valid = false;
|
||||
|
||||
switch (texture.value)
|
||||
{
|
||||
case Texture2D t:
|
||||
valid |= t.width == lutSize * lutSize
|
||||
&& !GraphicsFormatUtility.IsSRGBFormat(t.graphicsFormat);
|
||||
break;
|
||||
case RenderTexture rt:
|
||||
valid |= rt.dimension == TextureDimension.Tex2D
|
||||
&& rt.width == lutSize * lutSize
|
||||
&& !rt.sRGB;
|
||||
break;
|
||||
}
|
||||
|
||||
return valid;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
public enum DepthOfFieldMode
|
||||
{
|
||||
Off,
|
||||
Gaussian, // Non physical, fast, small radius, far blur only
|
||||
Bokeh
|
||||
}
|
||||
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Depth Of Field")]
|
||||
public sealed class DepthOfField : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Use \"Gaussian\" for a faster but non physical depth of field; \"Bokeh\" for a more realistic but slower depth of field.")]
|
||||
public DepthOfFieldModeParameter mode = new DepthOfFieldModeParameter(DepthOfFieldMode.Off);
|
||||
|
||||
[Tooltip("The distance at which the blurring will start.")]
|
||||
public MinFloatParameter gaussianStart = new MinFloatParameter(10f, 0f);
|
||||
|
||||
[Tooltip("The distance at which the blurring will reach its maximum radius.")]
|
||||
public MinFloatParameter gaussianEnd = new MinFloatParameter(30f, 0f);
|
||||
|
||||
[Tooltip("The maximum radius of the gaussian blur. Values above 1 may show under-sampling artifacts.")]
|
||||
public ClampedFloatParameter gaussianMaxRadius = new ClampedFloatParameter(1f, 0.5f, 1.5f);
|
||||
|
||||
[Tooltip("Use higher quality sampling to reduce flickering and improve the overall blur smoothness.")]
|
||||
public BoolParameter highQualitySampling = new BoolParameter(false);
|
||||
|
||||
[Tooltip("The distance to the point of focus.")]
|
||||
public MinFloatParameter focusDistance = new MinFloatParameter(10f, 0.1f);
|
||||
|
||||
[Tooltip("The ratio of aperture (known as f-stop or f-number). The smaller the value is, the shallower the depth of field is.")]
|
||||
public ClampedFloatParameter aperture = new ClampedFloatParameter(5.6f, 1f, 32f);
|
||||
|
||||
[Tooltip("The distance between the lens and the film. The larger the value is, the shallower the depth of field is.")]
|
||||
public ClampedFloatParameter focalLength = new ClampedFloatParameter(50f, 1f, 300f);
|
||||
|
||||
[Tooltip("The number of aperture blades.")]
|
||||
public ClampedIntParameter bladeCount = new ClampedIntParameter(5, 3, 9);
|
||||
|
||||
[Tooltip("The curvature of aperture blades. The smaller the value is, the more visible aperture blades are. A value of 1 will make the bokeh perfectly circular.")]
|
||||
public ClampedFloatParameter bladeCurvature = new ClampedFloatParameter(1f, 0f, 1f);
|
||||
|
||||
[Tooltip("The rotation of aperture blades in degrees.")]
|
||||
public ClampedFloatParameter bladeRotation = new ClampedFloatParameter(0f, -180f, 180f);
|
||||
|
||||
public bool IsActive()
|
||||
{
|
||||
if (mode.value == DepthOfFieldMode.Off || SystemInfo.graphicsShaderLevel < 35)
|
||||
return false;
|
||||
|
||||
return mode.value != DepthOfFieldMode.Gaussian || SystemInfo.supportedRenderTargetCount > 1;
|
||||
}
|
||||
|
||||
public bool IsTileCompatible() => false;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class DepthOfFieldModeParameter : VolumeParameter<DepthOfFieldMode> { public DepthOfFieldModeParameter(DepthOfFieldMode value, bool overrideState = false) : base(value, overrideState) {} }
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
public enum FilmGrainLookup
|
||||
{
|
||||
Thin1,
|
||||
Thin2,
|
||||
Medium1,
|
||||
Medium2,
|
||||
Medium3,
|
||||
Medium4,
|
||||
Medium5,
|
||||
Medium6,
|
||||
Large01,
|
||||
Large02,
|
||||
Custom
|
||||
}
|
||||
|
||||
[Serializable, VolumeComponentMenu("Post-processing/FilmGrain")]
|
||||
public sealed class FilmGrain : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("The type of grain to use. You can select a preset or provide your own texture by selecting Custom.")]
|
||||
public FilmGrainLookupParameter type = new FilmGrainLookupParameter(FilmGrainLookup.Thin1);
|
||||
|
||||
[Tooltip("Amount of vignetting on screen.")]
|
||||
public ClampedFloatParameter intensity = new ClampedFloatParameter(0f, 0f, 1f);
|
||||
|
||||
[Tooltip("Controls the noisiness response curve based on scene luminance. Higher values mean less noise in light areas.")]
|
||||
public ClampedFloatParameter response = new ClampedFloatParameter(0.8f, 0f, 1f);
|
||||
|
||||
[Tooltip("A tileable texture to use for the grain. The neutral value is 0.5 where no grain is applied.")]
|
||||
public NoInterpTextureParameter texture = new NoInterpTextureParameter(null);
|
||||
|
||||
public bool IsActive() => intensity.value > 0f && (type.value != FilmGrainLookup.Custom || texture.value != null);
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class FilmGrainLookupParameter : VolumeParameter<FilmGrainLookup> { public FilmGrainLookupParameter(FilmGrainLookup value, bool overrideState = false) : base(value, overrideState) {} }
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Lens Distortion")]
|
||||
public sealed class LensDistortion : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Total distortion amount.")]
|
||||
public ClampedFloatParameter intensity = new ClampedFloatParameter(0f, -1f, 1f);
|
||||
|
||||
[Tooltip("Intensity multiplier on X axis. Set it to 0 to disable distortion on this axis.")]
|
||||
public ClampedFloatParameter xMultiplier = new ClampedFloatParameter(1f, 0f, 1f);
|
||||
|
||||
[Tooltip("Intensity multiplier on Y axis. Set it to 0 to disable distortion on this axis.")]
|
||||
public ClampedFloatParameter yMultiplier = new ClampedFloatParameter(1f, 0f, 1f);
|
||||
|
||||
[Tooltip("Distortion center point.")]
|
||||
public Vector2Parameter center = new Vector2Parameter(new Vector2(0.5f, 0.5f));
|
||||
|
||||
[Tooltip("Global screen scaling.")]
|
||||
public ClampedFloatParameter scale = new ClampedFloatParameter(1f, 0.01f, 5f);
|
||||
|
||||
public bool IsActive()
|
||||
{
|
||||
return Mathf.Abs(intensity.value) > 0
|
||||
&& (xMultiplier.value > 0f || yMultiplier.value > 0f);
|
||||
}
|
||||
|
||||
public bool IsTileCompatible() => false;
|
||||
}
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Lift, Gamma, Gain")]
|
||||
public sealed class LiftGammaGain : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Controls the darkest portions of the render.")]
|
||||
public Vector4Parameter lift = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
|
||||
|
||||
[Tooltip("Power function that controls mid-range tones.")]
|
||||
public Vector4Parameter gamma = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
|
||||
|
||||
[Tooltip("Controls the lightest portions of the render.")]
|
||||
public Vector4Parameter gain = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
|
||||
|
||||
public bool IsActive()
|
||||
{
|
||||
var defaultState = new Vector4(1f, 1f, 1f, 0f);
|
||||
return lift != defaultState
|
||||
|| gamma != defaultState
|
||||
|| gain != defaultState;
|
||||
}
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
public enum MotionBlurMode
|
||||
{
|
||||
CameraOnly,
|
||||
CameraAndObjects
|
||||
}
|
||||
|
||||
public enum MotionBlurQuality
|
||||
{
|
||||
Low,
|
||||
Medium,
|
||||
High
|
||||
}
|
||||
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Motion Blur")]
|
||||
public sealed class MotionBlur : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("The motion blur technique to use. If you don't need object motion blur, CameraOnly will result in better performance.")]
|
||||
public MotionBlurModeParameter mode = new MotionBlurModeParameter(MotionBlurMode.CameraOnly);
|
||||
|
||||
[Tooltip("The quality of the effect. Lower presets will result in better performance at the expense of visual quality.")]
|
||||
public MotionBlurQualityParameter quality = new MotionBlurQualityParameter(MotionBlurQuality.Low);
|
||||
|
||||
[Tooltip("The strength of the motion blur filter. Acts as a multiplier for velocities.")]
|
||||
public ClampedFloatParameter intensity = new ClampedFloatParameter(0f, 0f, 1f);
|
||||
|
||||
[Tooltip("Sets the maximum length, as a fraction of the screen's full resolution, that the velocity resulting from Camera rotation can have. Lower values will improve performance.")]
|
||||
public ClampedFloatParameter clamp = new ClampedFloatParameter(0.05f, 0f, 0.2f);
|
||||
|
||||
public bool IsActive() => intensity.value > 0f && mode == MotionBlurMode.CameraOnly;
|
||||
|
||||
public bool IsTileCompatible() => false;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class MotionBlurModeParameter : VolumeParameter<MotionBlurMode> { public MotionBlurModeParameter(MotionBlurMode value, bool overrideState = false) : base(value, overrideState) {} }
|
||||
|
||||
[Serializable]
|
||||
public sealed class MotionBlurQualityParameter : VolumeParameter<MotionBlurQuality> { public MotionBlurQualityParameter(MotionBlurQuality value, bool overrideState = false) : base(value, overrideState) {} }
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Panini Projection")]
|
||||
public sealed class PaniniProjection : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Panini projection distance.")]
|
||||
public ClampedFloatParameter distance = new ClampedFloatParameter(0f, 0f, 1f);
|
||||
|
||||
[Tooltip("Panini projection crop to fit.")]
|
||||
public ClampedFloatParameter cropToFit = new ClampedFloatParameter(1f, 0f, 1f);
|
||||
|
||||
public bool IsActive() => distance.value > 0f;
|
||||
|
||||
public bool IsTileCompatible() => false;
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Shadows, Midtones, Highlights")]
|
||||
public sealed class ShadowsMidtonesHighlights : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Controls the darkest portions of the render.")]
|
||||
public Vector4Parameter shadows = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
|
||||
|
||||
[Tooltip("Power function that controls mid-range tones.")]
|
||||
public Vector4Parameter midtones = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
|
||||
|
||||
[Tooltip("Controls the lightest portions of the render.")]
|
||||
public Vector4Parameter highlights = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
|
||||
|
||||
[Tooltip("Start point of the transition between shadows and midtones.")]
|
||||
public MinFloatParameter shadowsStart = new MinFloatParameter(0f, 0f);
|
||||
|
||||
[Tooltip("End point of the transition between shadows and midtones.")]
|
||||
public MinFloatParameter shadowsEnd = new MinFloatParameter(0.3f, 0f);
|
||||
|
||||
[Tooltip("Start point of the transition between midtones and highlights.")]
|
||||
public MinFloatParameter highlightsStart = new MinFloatParameter(0.55f, 0f);
|
||||
|
||||
[Tooltip("End point of the transition between midtones and highlights.")]
|
||||
public MinFloatParameter highlightsEnd = new MinFloatParameter(1f, 0f);
|
||||
|
||||
public bool IsActive()
|
||||
{
|
||||
var defaultState = new Vector4(1f, 1f, 1f, 0f);
|
||||
return shadows != defaultState
|
||||
|| midtones != defaultState
|
||||
|| highlights != defaultState;
|
||||
}
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Split Toning")]
|
||||
public sealed class SplitToning : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("The color to use for shadows.")]
|
||||
public ColorParameter shadows = new ColorParameter(Color.grey, false, false, true);
|
||||
|
||||
[Tooltip("The color to use for highlights.")]
|
||||
public ColorParameter highlights = new ColorParameter(Color.grey, false, false, true);
|
||||
|
||||
[Tooltip("Balance between the colors in the highlights and shadows.")]
|
||||
public ClampedFloatParameter balance = new ClampedFloatParameter(0f, -100f, 100f);
|
||||
|
||||
public bool IsActive() => shadows != Color.grey || highlights != Color.grey;
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
public enum TonemappingMode
|
||||
{
|
||||
None,
|
||||
Neutral, // Neutral tonemapper
|
||||
ACES, // ACES Filmic reference tonemapper (custom approximation)
|
||||
}
|
||||
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Tonemapping")]
|
||||
public sealed class Tonemapping : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Select a tonemapping algorithm to use for the color grading process.")]
|
||||
public TonemappingModeParameter mode = new TonemappingModeParameter(TonemappingMode.None);
|
||||
|
||||
public bool IsActive() => mode.value != TonemappingMode.None;
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed class TonemappingModeParameter : VolumeParameter<TonemappingMode> { public TonemappingModeParameter(TonemappingMode value, bool overrideState = false) : base(value, overrideState) {} }
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/Vignette")]
|
||||
public sealed class Vignette : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Vignette color.")]
|
||||
public ColorParameter color = new ColorParameter(Color.black, false, false, true);
|
||||
|
||||
[Tooltip("Sets the vignette center point (screen center is [0.5,0.5]).")]
|
||||
public Vector2Parameter center = new Vector2Parameter(new Vector2(0.5f, 0.5f));
|
||||
|
||||
[Tooltip("Amount of vignetting on screen.")]
|
||||
public ClampedFloatParameter intensity = new ClampedFloatParameter(0f, 0f, 1f);
|
||||
|
||||
[Tooltip("Smoothness of the vignette borders.")]
|
||||
public ClampedFloatParameter smoothness = new ClampedFloatParameter(0.2f, 0.01f, 1f);
|
||||
|
||||
[Tooltip("Should the vignette be perfectly round or be dependent on the current aspect ratio?")]
|
||||
public BoolParameter rounded = new BoolParameter(false);
|
||||
|
||||
public bool IsActive() => intensity.value > 0f;
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Rendering.Universal
|
||||
{
|
||||
[Serializable, VolumeComponentMenu("Post-processing/White Balance")]
|
||||
public sealed class WhiteBalance : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
[Tooltip("Sets the white balance to a custom color temperature.")]
|
||||
public ClampedFloatParameter temperature = new ClampedFloatParameter(0f, -100, 100f);
|
||||
|
||||
[Tooltip("Sets the white balance to compensate for a green or magenta tint.")]
|
||||
public ClampedFloatParameter tint = new ClampedFloatParameter(0f, -100, 100f);
|
||||
|
||||
public bool IsActive() => temperature.value != 0f || tint.value != 0f;
|
||||
|
||||
public bool IsTileCompatible() => true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user