Added transparent depth pre pass;
Added transparent depth post pass; Added transparent depth write; Added transparent back then front render; Added transparent motion vector write;
This commit is contained in:
@@ -11,7 +11,14 @@ namespace Misaki.HdrpToon.Editor
|
||||
private static class Properties
|
||||
{
|
||||
public static MaterialProperty surfaceType;
|
||||
|
||||
public static MaterialProperty fogOnTransparent;
|
||||
public static MaterialProperty transparentDepthPrepassEnable;
|
||||
public static MaterialProperty transparentDepthPostpassEnable;
|
||||
public static MaterialProperty transparentBackfaceEnable;
|
||||
public static MaterialProperty transparentZWrite;
|
||||
public static MaterialProperty receivesSSRTransparent;
|
||||
public static MaterialProperty transparentWritingMotionVec;
|
||||
|
||||
public static MaterialProperty alphaClipEnable;
|
||||
public static MaterialProperty alphaClip;
|
||||
@@ -30,6 +37,12 @@ namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
public static readonly GUIContent transparentModeText = new("Surface Type", "Controls the surface type of the material.");
|
||||
public static readonly GUIContent fogOnTransparentText = new("Fog On Transparent", "Enable to apply fog effect on transparent objects.");
|
||||
public static readonly GUIContent transparentDepthPrepassEnableText = new("Depth Prepass", "Enable to perform a depth prepass for transparent objects.");
|
||||
public static readonly GUIContent transparentDepthPostpassEnableText = new("Depth Postpass", "Enable to perform a depth postpass for transparent objects.");
|
||||
public static readonly GUIContent transparentBackfaceEnableText = new("Back Then Front Rendering", "Enable to render the back faces of transparent objects first, then the front faces.");
|
||||
public static readonly GUIContent transparentZWriteText = new("Depth Write", "Enable to write depth for transparent objects. This is useful for correct depth testing with other transparent objects.");
|
||||
public static readonly GUIContent receivesSSRTransparentText = new("Receives SSR", "Enable to allow transparent objects to receive Screen Space Reflections (SSR).");
|
||||
public static readonly GUIContent transparentWritingMotionVec = new("Motion Vectors Write", "Enable to write motion vectors for transparent objects.");
|
||||
|
||||
public static readonly GUIContent alphaClipEnableText = new("Alpha Clipping", "Enable alpha clipping.");
|
||||
public static readonly GUIContent alphaClipText = new("Alpha Clipping Threshold", "Threshold for alpha clipping.");
|
||||
@@ -51,7 +64,14 @@ namespace Misaki.HdrpToon.Editor
|
||||
public override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.surfaceType = FindProperty(SURFACE_TYPE);
|
||||
|
||||
Properties.fogOnTransparent = FindProperty(FOG_ON_TRANSPARENT);
|
||||
Properties.transparentDepthPrepassEnable = FindProperty(TRANSPARENT_DEPTH_PREPASS_ENABLE);
|
||||
Properties.transparentDepthPostpassEnable = FindProperty(TRANSPARENT_DEPTH_POSTPASS_ENABLE);
|
||||
Properties.transparentBackfaceEnable = FindProperty(TRANSPARENT_BACKFACE_ENABLE);
|
||||
Properties.transparentZWrite = FindProperty(TRANSPARENT_Z_WRITE);
|
||||
Properties.receivesSSRTransparent = FindProperty(RECEIVES_SSR_TRANSPARENT);
|
||||
Properties.transparentWritingMotionVec = FindProperty(TRANSPARENT_WRITING_MOTION_VEC);
|
||||
|
||||
Properties.alphaClipEnable = FindProperty(ALPHA_CLIP_ENABLE);
|
||||
Properties.alphaClip = FindProperty(ALPHA_CUTOFF);
|
||||
@@ -74,6 +94,12 @@ namespace Misaki.HdrpToon.Editor
|
||||
if (Properties.surfaceType.GetBooleanValue())
|
||||
{
|
||||
editor.ShaderProperty(Properties.fogOnTransparent, Styles.fogOnTransparentText);
|
||||
editor.ShaderProperty(Properties.transparentDepthPrepassEnable, Styles.transparentDepthPrepassEnableText);
|
||||
editor.ShaderProperty(Properties.transparentDepthPostpassEnable, Styles.transparentDepthPostpassEnableText);
|
||||
editor.ShaderProperty(Properties.transparentBackfaceEnable, Styles.transparentBackfaceEnableText);
|
||||
editor.ShaderProperty(Properties.transparentZWrite, Styles.transparentZWriteText);
|
||||
editor.ShaderProperty(Properties.receivesSSRTransparent, Styles.receivesSSRTransparentText);
|
||||
editor.ShaderProperty(Properties.transparentWritingMotionVec, Styles.transparentWritingMotionVec);
|
||||
}
|
||||
|
||||
editor.ShaderProperty(Properties.cullMode, Styles.cullingModeText);
|
||||
|
||||
Reference in New Issue
Block a user