Skip to content

Commit

Permalink
added support for adjusting stencils, closes #74
Browse files Browse the repository at this point in the history
  • Loading branch information
orels1 committed Jul 3, 2024
1 parent 3fcd21f commit 664ac54
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
[Enum(UnityEngine.Rendering.CullMode)]_CullMode("Culling Mode", Int) = 2
[Enum(Off, 0, On, 1)]_ZWrite("Depth Write", Int) = 1
[Enum(UnityEngine.Rendering.CompareFunction)]_ZTest("Depth Test", Int) = 4
UI_AdvancedSettingsStancilHeader("## Stencils", Int) = 1
[IntRange]_StencilRef("Reference", Range(0, 255)) = 0
[Enum(UnityEngine.Rendering.CompareFunction)]_StencilComp("Comparison", Float) = 8
[Enum(UnityEngine.Rendering.StencilOp)]_StencilPassOp("Pass Operation", Float) = 0
[Enum(UnityEngine.Rendering.StencilOp)]_StencilFailOp("Fail Operation", Float) = 0
[Enum(UnityEngine.Rendering.StencilOp)]_StencilZFailOp("ZFail Operation", Float) = 0

UI_GSAAHeader("## GSAA", Float) = 0
[Toggle(GSAA)]_EnableGSAA("GSAA Enabled", Int) = 1
UI_GSAANote("> GSAA dramatically reduces specular aliasing", Int) = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
ZTest[_ZTest]
ZWrite[_ZWrite]
Cull[_CullMode]

%TemplateFeature("Stencil")
{
Stencil
{
Ref [_StencilRef]
Comp [_StencilComp]
Pass [_StencilPassOp]
Fail [_StencilFailOp]
ZFail [_StencilZFailOp]
}
}

%ShaderModifiers

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%ShaderName("orels1/Standard")
%ShaderName("orels1/Standard")
%TemplateFeatures("Stencil")
%CustomEditor("ORL.ShaderInspector.InspectorGUI")

%Properties()
Expand Down

0 comments on commit 664ac54

Please sign in to comment.