398 lines
15 KiB
Plaintext
398 lines
15 KiB
Plaintext
SubShader
|
|
{
|
|
Tags {*LIL_SUBSHADER_TAGS*}
|
|
HLSLINCLUDE
|
|
#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
|
|
{
|
|
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 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_brp.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
|
|
}
|
|
|
|
// Forward Fur
|
|
Pass
|
|
{
|
|
Name "FORWARD_FUR"
|
|
Tags {"LightMode" = "*LIL_LIGHTMODE_FORWARD_1*"}
|
|
|
|
Stencil
|
|
{
|
|
Ref [_FurStencilRef]
|
|
ReadMask [_FurStencilReadMask]
|
|
WriteMask [_FurStencilWriteMask]
|
|
Comp [_FurStencilComp]
|
|
Pass [_FurStencilPass]
|
|
Fail [_FurStencilFail]
|
|
ZFail [_FurStencilZFail]
|
|
}
|
|
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_brp.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
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// 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 lil_multi_compile_forwardadd
|
|
|
|
// 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 _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_brp.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
|
|
}
|
|
|
|
// ForwardAdd Fur
|
|
Pass
|
|
{
|
|
Name "FORWARD_ADD_FUR"
|
|
Tags {"LightMode" = "ForwardAdd"}
|
|
|
|
Stencil
|
|
{
|
|
Ref [_FurStencilRef]
|
|
ReadMask [_FurStencilReadMask]
|
|
WriteMask [_FurStencilWriteMask]
|
|
Comp [_FurStencilComp]
|
|
Pass [_FurStencilPass]
|
|
Fail [_FurStencilFail]
|
|
ZFail [_FurStencilZFail]
|
|
}
|
|
Cull [_FurCull]
|
|
ZClip [_FurZClip]
|
|
ZWrite Off
|
|
ZTest LEqual
|
|
ColorMask [_FurColorMask]
|
|
Offset [_FurOffsetFactor], [_FurOffsetUnits]
|
|
Blend [_FurSrcBlendFA] [_FurDstBlendFA], Zero One
|
|
BlendOp [_FurBlendOpFA], [_FurBlendOpAlphaFA]
|
|
AlphaToMask [_FurAlphaToMask]
|
|
|
|
HLSLPROGRAM
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Build Option
|
|
#pragma vertex vert
|
|
#pragma geometry geom
|
|
#pragma fragment frag
|
|
#pragma lil_multi_compile_forwardadd
|
|
|
|
// 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_brp.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
|
|
}
|
|
|
|
//
|
|
// 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 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
|
|
#include "Includes/lil_pipeline_brp.hlsl"
|
|
#include "Includes/lil_common.hlsl"
|
|
// Insert functions and includes that depend on Unity here
|
|
*LIL_SUBSHADER_INSERT*
|
|
|
|
#include "Includes/lil_pass_shadowcaster.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
|
|
|
|
//----------------------------------------------------------------------------------------------------------------------
|
|
// Pass
|
|
#include "Includes/lil_pipeline_brp.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 "Unlit/Texture" |