Boat Attack使用了Universal RP的许多新图形功能,可以用于探索 Universal RP 的使用方式和技巧。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

43 行
1.9 KiB

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) { } }
}