44 lines
1.7 KiB
C#
44 lines
1.7 KiB
C#
using System;
|
|
using UnityEngine.Rendering.Universal;
|
|
|
|
namespace UnityEngine.Rendering.Universal
|
|
{
|
|
|
|
[ExecuteInEditMode, VolumeComponentMenuForRenderPipeline("SSS", typeof(UniversalRenderPipeline))]
|
|
|
|
public class SSS : VolumeComponent, IPostProcessComponent
|
|
{
|
|
public FloatParameter Radius = new ClampedFloatParameter(0,0,.1f);
|
|
public IntParameter blurPasses = new ClampedIntParameter(3,0,15);
|
|
public IntParameter Iterations = new ClampedIntParameter(3,1,15);
|
|
public IntParameter Downsample = new ClampedIntParameter(1,1,2);
|
|
public FloatParameter Dither = new ClampedFloatParameter(.2f, 0, 1);
|
|
public FloatParameter DitherScale = new ClampedFloatParameter(10, 0, 20);
|
|
public FloatParameter FixPixelLeak = new ClampedFloatParameter(.2f, 0, 1);
|
|
public FloatParameter DepthTest = new ClampedFloatParameter(.9f, 0, 1);
|
|
public BoolParameter EnableProfileTest = new BoolParameter(false);
|
|
[Tooltip("Searches for color discontinuities")]
|
|
public FloatParameter ProfileColorTest = new ClampedFloatParameter(.1f, 0, 1);
|
|
[Tooltip("Searches for blur radius discontinuities")]
|
|
public FloatParameter ProfileRadiusTest = new ClampedFloatParameter(.9f, 0, 1);
|
|
[Tooltip("Searches discontinuities in the normal buffer")]
|
|
public BoolParameter EnableNormalTest = new BoolParameter(false);
|
|
public FloatParameter NormalTest = new ClampedFloatParameter(.1f, 0, 1);
|
|
|
|
//SSS_PassFeature.SSS_BlurSettings settings;
|
|
|
|
public bool IsActive()
|
|
{
|
|
if (Radius.value > 0)
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
public bool IsTileCompatible() => true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|