546 lines
29 KiB
GLSL
546 lines
29 KiB
GLSL
Shader "Hidden/ltspass_lite_transparent"
|
|
{
|
|
Properties
|
|
{
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Base
|
|
[lilToggle] _Invisible ("Invisible", Int) = 0
|
|
_AsUnlit ("As Unlit", Range(0, 1)) = 0
|
|
_Cutoff ("Alpha Cutoff", Range(-0.001,1.001)) = 0.001
|
|
_SubpassCutoff ("Subpass Alpha Cutoff", Range(0,1)) = 0.5
|
|
[lilToggle] _FlipNormal ("Flip Backface Normal", Int) = 0
|
|
[lilToggle] _ShiftBackfaceUV ("Shift Backface UV", Int) = 0
|
|
_BackfaceForceShadow ("Backface Force Shadow", Range(0,1)) = 0
|
|
_VertexLightStrength ("Vertex Light Strength", Range(0,1)) = 0
|
|
_LightMinLimit ("Light Min Limit", Range(0,1)) = 0.05
|
|
_LightMaxLimit ("Light Max Limit", Range(0,10)) = 1
|
|
_BeforeExposureLimit ("Before Exposure Limit", Float) = 10000
|
|
_MonochromeLighting ("Monochrome lighting", Range(0,1)) = 0
|
|
_AlphaBoostFA ("Alpha Boost", Range(1,100)) = 10
|
|
_lilDirectionalLightStrength ("Directional Light Strength", Range(0,1)) = 1
|
|
[lilVec3B] _LightDirectionOverride ("Light Direction Override", Vector) = (0.001,0.002,0.001,0)
|
|
[NoScaleOffset] _TriMask ("TriMask", 2D) = "white" {}
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Main
|
|
[lilHDR] [MainColor] _Color ("Color", Color) = (1,1,1,1)
|
|
[MainTexture] _MainTex ("Texture", 2D) = "white" {}
|
|
[lilUVAnim] _MainTex_ScrollRotate ("Angle|UV Animation|Scroll|Rotate", Vector) = (0,0,0,0)
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Shadow
|
|
[lilToggleLeft] _UseShadow ("Use Shadow", Int) = 0
|
|
_ShadowBorder ("Border", Range(0, 1)) = 0.5
|
|
_ShadowBlur ("Blur", Range(0, 1)) = 0.1
|
|
[NoScaleOffset] _ShadowColorTex ("Shadow Color", 2D) = "black" {}
|
|
_Shadow2ndBorder ("2nd Border", Range(0, 1)) = 0.5
|
|
_Shadow2ndBlur ("2nd Blur", Range(0, 1)) = 0.3
|
|
[NoScaleOffset] _Shadow2ndColorTex ("Shadow 2nd Color", 2D) = "black" {}
|
|
_ShadowEnvStrength ("Environment Strength", Range(0, 1)) = 0
|
|
_ShadowBorderColor ("Border Color", Color) = (1,0,0,1)
|
|
_ShadowBorderRange ("Border Range", Range(0, 1)) = 0
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// MatCap
|
|
[lilToggleLeft] _UseMatCap ("Use MatCap", Int) = 0
|
|
_MatCapTex ("Texture", 2D) = "white" {}
|
|
[lilVec2R] _MatCapBlendUV1 ("Blend UV1", Vector) = (0,0,0,0)
|
|
[lilToggle] _MatCapZRotCancel ("Z-axis rotation cancellation", Int) = 1
|
|
[lilToggle] _MatCapPerspective ("Fix Perspective", Int) = 1
|
|
_MatCapVRParallaxStrength ("VR Parallax Strength", Range(0, 1)) = 1
|
|
[lilToggle] _MatCapMul ("Multiply", Int) = 0
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Rim
|
|
[lilToggleLeft] _UseRim ("Use Rim", Int) = 0
|
|
[lilHDR] _RimColor ("Color", Color) = (1,1,1,1)
|
|
_RimBorder ("Border", Range(0, 1)) = 0.5
|
|
_RimBlur ("Blur", Range(0, 1)) = 0.1
|
|
[PowerSlider(3.0)]_RimFresnelPower ("Fresnel Power", Range(0.01, 50)) = 3.0
|
|
_RimShadowMask ("Shadow Mask", Range(0, 1)) = 0
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Emmision
|
|
[lilToggleLeft] _UseEmission ("Use Emission", Int) = 0
|
|
[HDR][lilHDR] _EmissionColor ("Color", Color) = (1,1,1,1)
|
|
_EmissionMap ("Texture", 2D) = "white" {}
|
|
[lilUVAnim] _EmissionMap_ScrollRotate ("Angle|UV Animation|Scroll|Rotate", Vector) = (0,0,0,0)
|
|
[lilEnum] _EmissionMap_UVMode ("UV Mode|UV0|UV1|UV2|UV3|Rim", Int) = 0
|
|
[lilBlink] _EmissionBlink ("Blink Strength|Blink Type|Blink Speed|Blink Offset", Vector) = (0,0,3.141593,0)
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Outline
|
|
[lilHDR] _OutlineColor ("Outline Color", Color) = (0.8,0.85,0.9,1)
|
|
_OutlineTex ("Texture", 2D) = "white" {}
|
|
[lilUVAnim] _OutlineTex_ScrollRotate ("Angle|UV Animation|Scroll|Rotate", Vector) = (0,0,0,0)
|
|
[lilOLWidth] _OutlineWidth ("Width", Range(0,1)) = 0.05
|
|
[NoScaleOffset] _OutlineWidthMask ("Width", 2D) = "white" {}
|
|
_OutlineFixWidth ("Fix Width", Range(0,1)) = 1
|
|
[lilEnum] _OutlineVertexR2Width ("Vertex Color|None|R|RGBA", Int) = 0
|
|
[lilToggle] _OutlineDeleteMesh ("Delete Mesh", Int) = 0
|
|
_OutlineEnableLighting ("Enable Lighting", Range(0, 1)) = 1
|
|
_OutlineZBias ("Z Bias", Float) = 0
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Save (Unused)
|
|
[HideInInspector] _BaseColor ("Color", Color) = (1,1,1,1)
|
|
[HideInInspector] _BaseMap ("Texture", 2D) = "white" {}
|
|
[HideInInspector] _BaseColorMap ("Texture", 2D) = "white" {}
|
|
[HideInInspector] _lilToonVersion ("Version", Int) = 32
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Advanced
|
|
[lilEnum] _Cull ("Cull Mode|Off|Front|Back", Int) = 2
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("SrcBlend", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("DstBlend", Int) = 10
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlpha ("SrcBlendAlpha", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlpha ("DstBlendAlpha", Int) = 10
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _BlendOp ("BlendOp", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlpha ("BlendOpAlpha", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendFA ("ForwardAdd SrcBlend", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlendFA ("ForwardAdd DstBlend", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlendAlphaFA ("ForwardAdd SrcBlendAlpha", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _BlendOpFA ("ForwardAdd BlendOp", Int) = 4
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _BlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4
|
|
[lilToggle] _ZClip ("ZClip", Int) = 1
|
|
[lilToggle] _ZWrite ("ZWrite", Int) = 1
|
|
[Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Int) = 4
|
|
[IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0
|
|
[IntRange] _StencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255
|
|
[IntRange] _StencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255
|
|
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Stencil Compare Function", Float) = 8
|
|
[Enum(UnityEngine.Rendering.StencilOp)] _StencilPass ("Stencil Pass", Float) = 0
|
|
[Enum(UnityEngine.Rendering.StencilOp)] _StencilFail ("Stencil Fail", Float) = 0
|
|
[Enum(UnityEngine.Rendering.StencilOp)] _StencilZFail ("Stencil ZFail", Float) = 0
|
|
_OffsetFactor ("Offset Factor", Float) = 0
|
|
_OffsetUnits ("Offset Units", Float) = 0
|
|
[lilColorMask] _ColorMask ("Color Mask", Int) = 15
|
|
[lilToggle] _AlphaToMask ("AlphaToMask", Int) = 0
|
|
_lilShadowCasterBias ("Shadow Caster Bias", Float) = 0
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Outline Advanced
|
|
[lilEnum] _OutlineCull ("Cull Mode|Off|Front|Back", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlend ("SrcBlend", Int) = 5
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlend ("DstBlend", Int) = 10
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlpha ("SrcBlendAlpha", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlpha ("DstBlendAlpha", Int) = 10
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOp ("BlendOp", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlpha ("BlendOpAlpha", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendFA ("ForwardAdd SrcBlend", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendFA ("ForwardAdd DstBlend", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _OutlineSrcBlendAlphaFA ("ForwardAdd SrcBlendAlpha", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _OutlineDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpFA ("ForwardAdd BlendOp", Int) = 4
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _OutlineBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4
|
|
[lilToggle] _OutlineZClip ("ZClip", Int) = 1
|
|
[lilToggle] _OutlineZWrite ("ZWrite", Int) = 1
|
|
[Enum(UnityEngine.Rendering.CompareFunction)] _OutlineZTest ("ZTest", Int) = 2
|
|
[IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0
|
|
[IntRange] _OutlineStencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255
|
|
[IntRange] _OutlineStencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255
|
|
[Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilComp ("Stencil Compare Function", Float) = 8
|
|
[Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPass ("Stencil Pass", Float) = 0
|
|
[Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFail ("Stencil Fail", Float) = 0
|
|
[Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFail ("Stencil ZFail", Float) = 0
|
|
_OutlineOffsetFactor ("Offset Factor", Float) = 0
|
|
_OutlineOffsetUnits ("Offset Units", Float) = 0
|
|
[lilColorMask] _OutlineColorMask ("Color Mask", Int) = 15
|
|
[lilToggle] _OutlineAlphaToMask ("AlphaToMask", Int) = 0
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pre
|
|
[lilHDR] [MainColor] _PreColor ("Pre Color", Color) = (1,1,1,1)
|
|
[lilEnum] _PreOutType ("Out Type|Normal|Flat|Mono", Int) = 0
|
|
_PreCutoff ("Pre Cutoff", Range(-0.001,1.001)) = 0.5
|
|
[lilEnum] _PreCull ("Cull Mode|Off|Front|Back", Int) = 2
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlend ("SrcBlend", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlend ("DstBlend", Int) = 10
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlpha ("SrcBlendAlpha", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlpha ("DstBlendAlpha", Int) = 10
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOp ("BlendOp", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlpha ("BlendOpAlpha", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendFA ("ForwardAdd SrcBlend", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendFA ("ForwardAdd DstBlend", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _PreSrcBlendAlphaFA ("ForwardAdd SrcBlendAlpha", Int) = 0
|
|
[Enum(UnityEngine.Rendering.BlendMode)] _PreDstBlendAlphaFA ("ForwardAdd DstBlendAlpha", Int) = 1
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpFA ("ForwardAdd BlendOp", Int) = 4
|
|
[Enum(UnityEngine.Rendering.BlendOp)] _PreBlendOpAlphaFA ("ForwardAdd BlendOpAlpha", Int) = 4
|
|
[lilToggle] _PreZClip ("ZClip", Int) = 1
|
|
[lilToggle] _PreZWrite ("ZWrite", Int) = 1
|
|
[Enum(UnityEngine.Rendering.CompareFunction)] _PreZTest ("ZTest", Int) = 4
|
|
[IntRange] _PreStencilRef ("Stencil Reference Value", Range(0, 255)) = 0
|
|
[IntRange] _PreStencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255
|
|
[IntRange] _PreStencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255
|
|
[Enum(UnityEngine.Rendering.CompareFunction)] _PreStencilComp ("Stencil Compare Function", Float) = 8
|
|
[Enum(UnityEngine.Rendering.StencilOp)] _PreStencilPass ("Stencil Pass", Float) = 0
|
|
[Enum(UnityEngine.Rendering.StencilOp)] _PreStencilFail ("Stencil Fail", Float) = 0
|
|
[Enum(UnityEngine.Rendering.StencilOp)] _PreStencilZFail ("Stencil ZFail", Float) = 0
|
|
_PreOffsetFactor ("Offset Factor", Float) = 0
|
|
_PreOffsetUnits ("Offset Units", Float) = 0
|
|
[lilColorMask] _PreColorMask ("Color Mask", Int) = 15
|
|
[lilToggle] _PreAlphaToMask ("AlphaToMask", Int) = 0
|
|
}
|
|
|
|
HLSLINCLUDE
|
|
#define LIL_RENDER 2
|
|
ENDHLSL
|
|
|
|
SubShader
|
|
{
|
|
HLSLINCLUDE
|
|
#pragma exclude_renderers d3d11_9x
|
|
#pragma fragmentoption ARB_precision_hint_fastest
|
|
#define LIL_LITE
|
|
|
|
#pragma skip_variants SHADOWS_SCREEN _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _ADDITIONAL_LIGHT_SHADOWS SCREEN_SPACE_SHADOWS_ON SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH SHADOW_VERY_HIGH
|
|
#pragma skip_variants DECALS_OFF DECALS_3RT DECALS_4RT DECAL_SURFACE_GRADIENT _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
|
|
#pragma skip_variants _ADDITIONAL_LIGHT_SHADOWS
|
|
#pragma skip_variants PROBE_VOLUMES_OFF PROBE_VOLUMES_L1 PROBE_VOLUMES_L2
|
|
#pragma skip_variants _SCREEN_SPACE_OCCLUSION
|
|
#pragma skip_variants _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION
|
|
ENDHLSL
|
|
|
|
|
|
// Forward Back
|
|
Pass
|
|
{
|
|
Name "FORWARD_BACK"
|
|
Tags {"LightMode" = "ForwardBase"}
|
|
|
|
Stencil
|
|
{
|
|
Ref [_PreStencilRef]
|
|
ReadMask [_PreStencilReadMask]
|
|
WriteMask [_PreStencilWriteMask]
|
|
Comp [_PreStencilComp]
|
|
Pass [_PreStencilPass]
|
|
Fail [_PreStencilFail]
|
|
ZFail [_PreStencilZFail]
|
|
}
|
|
Cull [_PreCull]
|
|
ZClip [_PreZClip]
|
|
ZWrite [_PreZWrite]
|
|
ZTest [_PreZTest]
|
|
ColorMask [_PreColorMask]
|
|
Offset [_PreOffsetFactor], [_PreOffsetUnits]
|
|
BlendOp [_PreBlendOp], [_PreBlendOpAlpha]
|
|
Blend [_PreSrcBlend] [_PreDstBlend], [_PreSrcBlendAlpha] [_PreDstBlendAlpha]
|
|
AlphaToMask [_PreAlphaToMask]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma multi_compile_fwdbase
|
|
#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2
|
|
#pragma multi_compile_instancing
|
|
#define LIL_PASS_FORWARD
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#define LIL_TRANSPARENT_PRE
|
|
#include "Includes/lil_pipeline_brp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
|
|
#include "Includes/lil_pass_forward.hlsl"
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
// Forward
|
|
Pass
|
|
{
|
|
Name "FORWARD"
|
|
Tags {"LightMode" = "ForwardBase"}
|
|
|
|
Stencil
|
|
{
|
|
Ref [_StencilRef]
|
|
ReadMask [_StencilReadMask]
|
|
WriteMask [_StencilWriteMask]
|
|
Comp [_StencilComp]
|
|
Pass [_StencilPass]
|
|
Fail [_StencilFail]
|
|
ZFail [_StencilZFail]
|
|
}
|
|
Cull [_Cull]
|
|
ZClip [_ZClip]
|
|
ZWrite [_ZWrite]
|
|
ZTest [_ZTest]
|
|
ColorMask [_ColorMask]
|
|
Offset [_OffsetFactor], [_OffsetUnits]
|
|
BlendOp [_BlendOp], [_BlendOpAlpha]
|
|
Blend [_SrcBlend] [_DstBlend], [_SrcBlendAlpha] [_DstBlendAlpha]
|
|
AlphaToMask [_AlphaToMask]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma multi_compile_fwdbase
|
|
#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2
|
|
#pragma multi_compile_instancing
|
|
#define LIL_PASS_FORWARD
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#include "Includes/lil_pipeline_brp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
|
|
#include "Includes/lil_pass_forward.hlsl"
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
// Forward Outline
|
|
Pass
|
|
{
|
|
Name "FORWARD_OUTLINE"
|
|
Tags {"LightMode" = "ForwardBase"}
|
|
|
|
Stencil
|
|
{
|
|
Ref [_OutlineStencilRef]
|
|
ReadMask [_OutlineStencilReadMask]
|
|
WriteMask [_OutlineStencilWriteMask]
|
|
Comp [_OutlineStencilComp]
|
|
Pass [_OutlineStencilPass]
|
|
Fail [_OutlineStencilFail]
|
|
ZFail [_OutlineStencilZFail]
|
|
}
|
|
Cull [_OutlineCull]
|
|
ZClip [_OutlineZClip]
|
|
ZWrite [_OutlineZWrite]
|
|
ZTest [_OutlineZTest]
|
|
ColorMask [_OutlineColorMask]
|
|
Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits]
|
|
BlendOp [_OutlineBlendOp], [_OutlineBlendOpAlpha]
|
|
Blend [_OutlineSrcBlend] [_OutlineDstBlend], [_OutlineSrcBlendAlpha] [_OutlineDstBlendAlpha]
|
|
AlphaToMask [_OutlineAlphaToMask]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma multi_compile_fwdbase
|
|
#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2
|
|
#pragma multi_compile_instancing
|
|
#define LIL_PASS_FORWARD
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#define LIL_OUTLINE
|
|
#include "Includes/lil_pipeline_brp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
|
|
#include "Includes/lil_pass_forward.hlsl"
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// ForwardAdd Start
|
|
//
|
|
|
|
// ForwardAdd
|
|
Pass
|
|
{
|
|
Name "FORWARD_ADD"
|
|
Tags {"LightMode" = "ForwardAdd"}
|
|
|
|
Stencil
|
|
{
|
|
Ref [_StencilRef]
|
|
ReadMask [_StencilReadMask]
|
|
WriteMask [_StencilWriteMask]
|
|
Comp [_StencilComp]
|
|
Pass [_StencilPass]
|
|
Fail [_StencilFail]
|
|
ZFail [_StencilZFail]
|
|
}
|
|
Cull [_Cull]
|
|
ZClip [_ZClip]
|
|
ZWrite Off
|
|
ZTest LEqual
|
|
ColorMask [_ColorMask]
|
|
Offset [_OffsetFactor], [_OffsetUnits]
|
|
Blend [_SrcBlendFA] [_DstBlendFA], Zero One
|
|
BlendOp [_BlendOpFA], [_BlendOpAlphaFA]
|
|
AlphaToMask [_AlphaToMask]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma multi_compile_fragment POINT DIRECTIONAL SPOT POINT_COOKIE DIRECTIONAL_COOKIE
|
|
#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2
|
|
#pragma multi_compile_instancing
|
|
#define LIL_PASS_FORWARDADD
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#include "Includes/lil_pipeline_brp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
|
|
#include "Includes/lil_pass_forward.hlsl"
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
// ForwardAdd Outline
|
|
Pass
|
|
{
|
|
Name "FORWARD_ADD_OUTLINE"
|
|
Tags {"LightMode" = "ForwardAdd"}
|
|
|
|
Stencil
|
|
{
|
|
Ref [_OutlineStencilRef]
|
|
ReadMask [_OutlineStencilReadMask]
|
|
WriteMask [_OutlineStencilWriteMask]
|
|
Comp [_OutlineStencilComp]
|
|
Pass [_OutlineStencilPass]
|
|
Fail [_OutlineStencilFail]
|
|
ZFail [_OutlineStencilZFail]
|
|
}
|
|
Cull [_OutlineCull]
|
|
ZClip [_OutlineZClip]
|
|
ZWrite Off
|
|
ZTest LEqual
|
|
ColorMask [_OutlineColorMask]
|
|
Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits]
|
|
Blend [_OutlineSrcBlendFA] [_OutlineDstBlendFA], Zero One
|
|
BlendOp [_OutlineBlendOpFA], [_OutlineBlendOpAlphaFA]
|
|
AlphaToMask [_OutlineAlphaToMask]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma multi_compile_fragment POINT DIRECTIONAL SPOT POINT_COOKIE DIRECTIONAL_COOKIE
|
|
#pragma multi_compile_vertex _ FOG_LINEAR FOG_EXP FOG_EXP2
|
|
#pragma multi_compile_instancing
|
|
#define LIL_PASS_FORWARDADD
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#define LIL_OUTLINE
|
|
#include "Includes/lil_pipeline_brp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
|
|
#include "Includes/lil_pass_forward.hlsl"
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
//
|
|
// ForwardAdd End
|
|
|
|
// ShadowCaster
|
|
Pass
|
|
{
|
|
Name "SHADOW_CASTER"
|
|
Tags {"LightMode" = "ShadowCaster"}
|
|
Offset 1, 1
|
|
Cull [_Cull]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma multi_compile_shadowcaster
|
|
#pragma multi_compile_instancing
|
|
#define LIL_PASS_SHADOWCASTER
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#include "Includes/lil_pipeline_brp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
|
|
#include "Includes/lil_pass_shadowcaster.hlsl"
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
// ShadowCaster Outline
|
|
Pass
|
|
{
|
|
Name "SHADOW_CASTER_OUTLINE"
|
|
Tags {"LightMode" = "ShadowCaster"}
|
|
Offset 1, 1
|
|
Cull [_Cull]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma multi_compile_shadowcaster
|
|
#pragma multi_compile_instancing
|
|
#define LIL_PASS_SHADOWCASTER
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#define LIL_OUTLINE
|
|
#include "Includes/lil_pipeline_brp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
|
|
#include "Includes/lil_pass_shadowcaster.hlsl"
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
// Meta
|
|
Pass
|
|
{
|
|
Name "META"
|
|
Tags {"LightMode" = "Meta"}
|
|
Cull Off
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma shader_feature EDITOR_VISUALIZATION
|
|
#define LIL_PASS_META
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#include "Includes/lil_pipeline_brp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
|
|
#include "Includes/lil_pass_meta.hlsl"
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
}
|
|
Fallback "Unlit/Texture"
|
|
}
|
|
|