370 lines
13 KiB
Plaintext
370 lines
13 KiB
Plaintext
SubShader
|
|
{
|
|
Tags {*LIL_SUBSHADER_TAGS*}
|
|
HLSLINCLUDE
|
|
#pragma target 4.5
|
|
#pragma exclude_renderers gles gles3 glcore
|
|
#pragma require geometry
|
|
#pragma fragmentoption ARB_precision_hint_fastest
|
|
#define LIL_FUR
|
|
#define LIL_MULTI
|
|
#define LIL_MULTI_INPUTS_MAIN_TONECORRECTION
|
|
#define LIL_MULTI_INPUTS_MAIN2ND
|
|
#define LIL_MULTI_INPUTS_MAIN3RD
|
|
#define LIL_MULTI_INPUTS_ALPHAMASK
|
|
#define LIL_MULTI_INPUTS_SHADOW
|
|
#define LIL_MULTI_INPUTS_BACKLIGHT
|
|
#define LIL_MULTI_INPUTS_EMISSION
|
|
#define LIL_MULTI_INPUTS_EMISSION_2ND
|
|
#define LIL_MULTI_INPUTS_NORMAL
|
|
#define LIL_MULTI_INPUTS_NORMAL_2ND
|
|
#define LIL_MULTI_INPUTS_ANISOTROPY
|
|
#define LIL_MULTI_INPUTS_REFLECTION
|
|
#define LIL_MULTI_INPUTS_MATCAP
|
|
#define LIL_MULTI_INPUTS_MATCAP_2ND
|
|
#define LIL_MULTI_INPUTS_RIM
|
|
#define LIL_MULTI_INPUTS_GLITTER
|
|
#define LIL_MULTI_INPUTS_PARALLAX
|
|
#define LIL_MULTI_INPUTS_DISTANCE_FADE
|
|
#define LIL_MULTI_INPUTS_AUDIOLINK
|
|
#define LIL_MULTI_INPUTS_DISSOLVE
|
|
|
|
#pragma lil_skip_variants_shadows
|
|
#pragma lil_skip_variants_decals
|
|
#pragma lil_skip_variants_addlightshadows
|
|
#pragma lil_skip_variants_probevolumes
|
|
#pragma lil_skip_variants_ao
|
|
ENDHLSL
|
|
|
|
*LIL_INSERT_PASS_PRE*
|
|
|
|
// Forward
|
|
Pass
|
|
{
|
|
Name "FORWARD"
|
|
Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_0*"}
|
|
|
|
Stencil
|
|
{
|
|
WriteMask 6
|
|
Ref 0
|
|
Comp Always
|
|
Pass Replace
|
|
}
|
|
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 lil_multi_compile_forward
|
|
|
|
// Transparent mode
|
|
#pragma shader_feature_local UNITY_UI_ALPHACLIP
|
|
#pragma shader_feature_local UNITY_UI_CLIP_RECT
|
|
|
|
// AlphaMask and Dissolve
|
|
#pragma shader_feature_local _COLOROVERLAY_ON
|
|
#pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL
|
|
|
|
// Main
|
|
#pragma shader_feature_local EFFECT_HUE_VARIATION
|
|
#pragma shader_feature_local _COLORADDSUBDIFF_ON
|
|
#pragma shader_feature_local _COLORCOLOR_ON
|
|
#pragma shader_feature_local _SUNDISK_NONE
|
|
#pragma shader_feature_local GEOM_TYPE_FROND
|
|
#pragma shader_feature_local _REQUIRE_UV2
|
|
#pragma shader_feature_local ANTI_FLICKER
|
|
#pragma shader_feature_local _EMISSION
|
|
#pragma shader_feature_local GEOM_TYPE_BRANCH
|
|
#pragma shader_feature_local _SUNDISK_SIMPLE
|
|
#pragma shader_feature_local _NORMALMAP
|
|
#pragma shader_feature_local EFFECT_BUMP
|
|
#pragma shader_feature_local SOURCE_GBUFFER
|
|
#pragma shader_feature_local _GLOSSYREFLECTIONS_OFF
|
|
#pragma shader_feature_local _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
|
#pragma shader_feature_local _SPECULARHIGHLIGHTS_OFF
|
|
#pragma shader_feature_local GEOM_TYPE_MESH
|
|
#pragma shader_feature_local _METALLICGLOSSMAP
|
|
#pragma shader_feature_local GEOM_TYPE_LEAF
|
|
#pragma shader_feature_local _SPECGLOSSMAP
|
|
#pragma shader_feature_local _PARALLAXMAP
|
|
#pragma shader_feature_local PIXELSNAP_ON
|
|
#pragma shader_feature_local _FADING_ON
|
|
#pragma shader_feature_local _MAPPING_6_FRAMES_LAYOUT
|
|
#pragma shader_feature_local _SUNDISK_HIGH_QUALITY
|
|
|
|
// Replace keywords
|
|
#include "Includes/lil_replace_keywords.hlsl"
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#include "Includes/lil_pipeline_hdrp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
*LIL_SUBSHADER_INSERT*
|
|
|
|
#include "Includes/lil_pass_forward.hlsl"
|
|
|
|
*LIL_SUBSHADER_INSERT_POST*
|
|
ENDHLSL
|
|
}
|
|
|
|
// Fur
|
|
Pass
|
|
{
|
|
Name "FORWARD_FUR"
|
|
Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"}
|
|
|
|
Stencil
|
|
{
|
|
WriteMask 6
|
|
Ref 0
|
|
Comp Always
|
|
Pass Replace
|
|
}
|
|
Cull [_FurCull]
|
|
ZClip [_FurZClip]
|
|
ZWrite [_FurZWrite]
|
|
ZTest [_FurZTest]
|
|
ColorMask [_FurColorMask]
|
|
Offset [_FurOffsetFactor], [_FurOffsetUnits]
|
|
BlendOp [_FurBlendOp], [_FurBlendOpAlpha]
|
|
Blend [_FurSrcBlend] [_FurDstBlend], [_FurSrcBlendAlpha] [_FurDstBlendAlpha]
|
|
AlphaToMask [_FurAlphaToMask]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma geometry geom
|
|
#pragma fragment frag
|
|
#pragma lil_multi_compile_forward
|
|
|
|
// Transparent mode
|
|
#pragma shader_feature_local UNITY_UI_CLIP_RECT
|
|
|
|
// Main
|
|
#pragma shader_feature_local _REQUIRE_UV2
|
|
#pragma shader_feature_local _FADING_ON
|
|
|
|
// Replace keywords
|
|
#include "Includes/lil_replace_keywords.hlsl"
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#include "Includes/lil_pipeline_hdrp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
*LIL_SUBSHADER_INSERT*
|
|
|
|
#include "Includes/lil_pass_forward_fur.hlsl"
|
|
|
|
*LIL_SUBSHADER_INSERT_POST*
|
|
ENDHLSL
|
|
}
|
|
|
|
// ShadowCaster
|
|
Pass
|
|
{
|
|
Name "SHADOW_CASTER"
|
|
Tags {"LightMode" = "ShadowCaster"}
|
|
|
|
Cull[_Cull]
|
|
ZClip [_ZClip]
|
|
ZWrite On
|
|
ZTest LEqual
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma geometry geom
|
|
#pragma fragment frag
|
|
#pragma lil_multi_compile_shadowcaster
|
|
|
|
// Transparent mode
|
|
#pragma shader_feature_local UNITY_UI_ALPHACLIP
|
|
#pragma shader_feature_local UNITY_UI_CLIP_RECT
|
|
|
|
// AlphaMask and Dissolve
|
|
#pragma shader_feature_local _COLOROVERLAY_ON
|
|
#pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL
|
|
|
|
// Replace keywords
|
|
#include "Includes/lil_replace_keywords.hlsl"
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#define LIL_ONEPASS_FUR
|
|
#include "Includes/lil_pipeline_hdrp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
*LIL_SUBSHADER_INSERT*
|
|
|
|
#include "Includes/lil_pass_depthonly.hlsl"
|
|
|
|
*LIL_SUBSHADER_INSERT_POST*
|
|
ENDHLSL
|
|
}
|
|
|
|
// DepthOnly
|
|
Pass
|
|
{
|
|
Name "DEPTHONLY"
|
|
Tags {"LightMode" = "DepthForwardOnly"}
|
|
|
|
Stencil
|
|
{
|
|
WriteMask 8
|
|
Ref 0
|
|
Comp Always
|
|
Pass Replace
|
|
}
|
|
Cull Back
|
|
ZClip [_ZClip]
|
|
ZWrite [_ZWrite]
|
|
ZTest [_ZTest]
|
|
Offset [_OffsetFactor], [_OffsetUnits]
|
|
AlphaToMask [_AlphaToMask]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma geometry geom
|
|
#pragma fragment frag
|
|
#pragma lil_multi_compile_depthonly
|
|
|
|
// Transparent mode
|
|
#pragma shader_feature_local UNITY_UI_ALPHACLIP
|
|
#pragma shader_feature_local UNITY_UI_CLIP_RECT
|
|
|
|
// AlphaMask and Dissolve
|
|
#pragma shader_feature_local _COLOROVERLAY_ON
|
|
#pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL
|
|
|
|
// Replace keywords
|
|
#include "Includes/lil_replace_keywords.hlsl"
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#define LIL_ONEPASS_FUR
|
|
#include "Includes/lil_pipeline_hdrp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
*LIL_SUBSHADER_INSERT*
|
|
|
|
#include "Includes/lil_pass_depthonly.hlsl"
|
|
|
|
*LIL_SUBSHADER_INSERT_POST*
|
|
ENDHLSL
|
|
}
|
|
|
|
// MotionVectors
|
|
Pass
|
|
{
|
|
Name "MOTIONVECTORS"
|
|
Tags {"LightMode" = "MotionVectors"}
|
|
|
|
Stencil
|
|
{
|
|
WriteMask 40
|
|
Ref 32
|
|
Comp Always
|
|
Pass Replace
|
|
}
|
|
Cull Back
|
|
ZClip [_ZClip]
|
|
ZWrite [_ZWrite]
|
|
ZTest [_ZTest]
|
|
Offset [_OffsetFactor], [_OffsetUnits]
|
|
AlphaToMask [_AlphaToMask]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma geometry geom
|
|
#pragma fragment frag
|
|
#pragma lil_multi_compile_motionvectors
|
|
|
|
// Transparent mode
|
|
#pragma shader_feature_local UNITY_UI_ALPHACLIP
|
|
#pragma shader_feature_local UNITY_UI_CLIP_RECT
|
|
|
|
// AlphaMask and Dissolve
|
|
#pragma shader_feature_local _COLOROVERLAY_ON
|
|
#pragma shader_feature_local GEOM_TYPE_BRANCH_DETAIL
|
|
|
|
// Replace keywords
|
|
#include "Includes/lil_replace_keywords.hlsl"
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#define LIL_ONEPASS_FUR
|
|
#include "Includes/lil_pipeline_hdrp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
*LIL_SUBSHADER_INSERT*
|
|
|
|
#include "Includes/lil_pass_motionvectors.hlsl"
|
|
|
|
*LIL_SUBSHADER_INSERT_POST*
|
|
ENDHLSL
|
|
}
|
|
|
|
// Meta
|
|
Pass
|
|
{
|
|
Name "META"
|
|
Tags {"LightMode" = "META"}
|
|
Cull Off
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
#pragma lil_multi_compile_meta
|
|
|
|
// Tone correction and emission
|
|
#pragma shader_feature_local EFFECT_HUE_VARIATION
|
|
#pragma shader_feature_local _EMISSION
|
|
#pragma shader_feature_local GEOM_TYPE_BRANCH
|
|
#pragma shader_feature_local _SUNDISK_SIMPLE
|
|
|
|
// Replace keywords
|
|
#include "Includes/lil_replace_keywords.hlsl"
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#include "Includes/lil_pipeline_hdrp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
*LIL_SUBSHADER_INSERT*
|
|
|
|
#include "Includes/lil_pass_meta.hlsl"
|
|
|
|
*LIL_SUBSHADER_INSERT_POST*
|
|
ENDHLSL
|
|
}
|
|
|
|
*LIL_INSERT_PASS_POST*
|
|
}
|
|
Fallback "HDRP/Unlit" |