Shader properties clean up;

This commit is contained in:
2025-03-24 14:58:28 +09:00
parent b205c1523d
commit 5a282e0812
6 changed files with 107 additions and 428 deletions

View File

@@ -238,7 +238,7 @@ Shader "HDRP/Toon"
// Advance // Advance
_LightIntensityMultiplier("Light_Intensity_Multiplier" , Range(0, 1)) = 0.5 _LightIntensityMultiplier("Light_Intensity_Multiplier" , Range(0, 1)) = 0.5
[ToggleUI] _ClampLightColor("VRChat : SceneLights HiCut_Filter", Float) = 0 [ToggleUI] _ClampLightColor("VRChat : SceneLights HiCut_Filter", Float) = 0
[KeywordEnum(NONE, SINGLE, FULL)] _Light_Loop_Mode ("Light Loop Mode", Float) = 2 [KeywordEnum(Single, Full, Custom)] _Light_Loop_Mode ("Light Loop Mode", Float) = 1
} }
HLSLINCLUDE HLSLINCLUDE
@@ -676,7 +676,6 @@ Shader "HDRP/Toon"
Pass Pass
{ {
Name "ForwardOnly" Name "ForwardOnly"
Tags { "LightMode" = "ForwardOnly" } Tags { "LightMode" = "ForwardOnly" }
@@ -694,8 +693,6 @@ Shader "HDRP/Toon"
} }
HLSLPROGRAM HLSLPROGRAM
//#pragma multi_compile _ UTS_DEBUG_SHADOWMAP_BINALIZATION //#pragma multi_compile _ UTS_DEBUG_SHADOWMAP_BINALIZATION
#pragma multi_compile _ DEBUG_DISPLAY #pragma multi_compile _ DEBUG_DISPLAY
@@ -733,6 +730,8 @@ Shader "HDRP/Toon"
#pragma shader_feature ENABLE_UTS_HAIR_SHAOW #pragma shader_feature ENABLE_UTS_HAIR_SHAOW
#pragma shader_feature ENABLE_UTS_HAIR_BLENDING #pragma shader_feature ENABLE_UTS_HAIR_BLENDING
#pragma shader_feature_local_fragment _LIGHT_LOOP_MODE_SINGLE _LIGHT_LOOP_MODE_FULL _LIGHT_LOOP_MODE_CUSTOM
#pragma shader_feature_local_fragment _SHADING_MODE_STANDARD _SHADING_MODE_SDF #pragma shader_feature_local_fragment _SHADING_MODE_STANDARD _SHADING_MODE_SDF
#pragma shader_feature_local_fragment _MATERIAL_TYPE_STANDARD _MATERIAL_TYPE_FRONTHAIR _MATERIAL_TYPE_FACE _MATERIAL_TYPE_EYE #pragma shader_feature_local_fragment _MATERIAL_TYPE_STANDARD _MATERIAL_TYPE_FRONTHAIR _MATERIAL_TYPE_FACE _MATERIAL_TYPE_EYE
#pragma shader_feature_local_fragment _PBR_MODE_OFF _PBR_MODE_STANDARD _PBR_MODE_ANISOTROPY _PBR_MODE_HAIR _PBR_MODE_TOON #pragma shader_feature_local_fragment _PBR_MODE_OFF _PBR_MODE_STANDARD _PBR_MODE_ANISOTROPY _PBR_MODE_HAIR _PBR_MODE_TOON

View File

@@ -58,7 +58,6 @@ float3 ComputeSpecularTerm(UtsBSDFData bsdfData, PreLightData preLightData, floa
DV = D_KajiyaKay(t, H, specularExponent); DV = D_KajiyaKay(t, H, specularExponent);
float normalizeSpec = DV * rcp(specularExponent + 2) * 2 * PI; float normalizeSpec = DV * rcp(specularExponent + 2) * 2 * PI;
//DV *= StepFeatherToon(normalizeSpec,specularStep,specularFeather);
DV = DV * normalizeSpec * _KKColor.rgb; DV = DV * normalizeSpec * _KKColor.rgb;
#elif _PBR_MODE_TOON #elif _PBR_MODE_TOON
float specularExponent = RoughnessToBlinnPhongSpecularExponent(PerceptualRoughnessToRoughness(bsdfData.perceptualRoughness)); float specularExponent = RoughnessToBlinnPhongSpecularExponent(PerceptualRoughnessToRoughness(bsdfData.perceptualRoughness));
@@ -121,7 +120,7 @@ DirectLighting UtsShadeSurface(PositionInputs posInput, UtsBSDFData bsdfData, Pr
#if _SHADING_MODE_SDF #if _SHADING_MODE_SDF
float angle; float angle;
float3 sdfTexture = SampleSDFTexture(L, uv, angle); // r: sdf shadow, g: sdf highlight, b: fixed shadow float3 sdfTexture = SampleSDFTexture(L, uv, angle); // r: sdf shadow, g: sdf highlight, b: halfshadow
float shadowSmoothLevel = _SDFShadowSmoothLevel / 10.0; float shadowSmoothLevel = _SDFShadowSmoothLevel / 10.0;
float sdfShadowMask = smoothstep(angle - shadowSmoothLevel, angle + shadowSmoothLevel, sdfTexture.r); float sdfShadowMask = smoothstep(angle - shadowSmoothLevel, angle + shadowSmoothLevel, sdfTexture.r);
float sdfHighlight = sdfTexture.g * _SDFHighlightStrength; float sdfHighlight = sdfTexture.g * _SDFHighlightStrength;
@@ -155,12 +154,12 @@ DirectLighting UtsShadeSurface(PositionInputs posInput, UtsBSDFData bsdfData, Pr
float NdotL = dot(bsdfData.normalWS, L); float NdotL = dot(bsdfData.normalWS, L);
float halfLambert = 0.5 * NdotL + 0.5; float halfLambert = 0.5 * NdotL + 0.5;
float firstColorFeatherForMask = lerp(_1stShadeColorFeather, 0.0, max(_ComposerMaskMode, _FirstShadeOverridden)); // float firstColorFeatherForMask = lerp(_1stShadeColorFeather, 0.0, max(_ComposerMaskMode, _FirstShadeOverridden));
float baseShadeMask = saturate((halfLambert - (_1stShadeColorStep - firstColorFeatherForMask)) / (_1stShadeColorStep - (_1stShadeColorStep - firstColorFeatherForMask))); float baseShadeMask = saturate((halfLambert - (_1stShadeColorStep - _1stShadeColorFeather)) / (_1stShadeColorStep - (_1stShadeColorStep - _1stShadeColorFeather)));
baseShadeMask *= sharpShadow.x; baseShadeMask *= sharpShadow.x;
float secondColorFeatherForMask = lerp(_2ndShadeColorFeather, 0.0, max(_SecondShadeOverridden, _ComposerMaskMode)); // float secondColorFeatherForMask = lerp(_2ndShadeColorFeather, 0.0, max(_SecondShadeOverridden, _ComposerMaskMode));
float firstShadeMask = saturate((halfLambert - (_2ndShadeColorStep - secondColorFeatherForMask)) / (_2ndShadeColorStep - (_2ndShadeColorStep - secondColorFeatherForMask))); float firstShadeMask = saturate((halfLambert - (_2ndShadeColorStep - _2ndShadeColorFeather)) / (_2ndShadeColorStep - (_2ndShadeColorStep - _2ndShadeColorFeather)));
diffuseTerm = lerp(lerp(bsdfData.secondShadingDiffuseColor, bsdfData.firstShadingDiffuseColor, firstShadeMask), bsdfData.diffuseColor, baseShadeMask); diffuseTerm = lerp(lerp(bsdfData.secondShadingDiffuseColor, bsdfData.firstShadingDiffuseColor, firstShadeMask), bsdfData.diffuseColor, baseShadeMask);
specularTerm *= baseShadeMask; specularTerm *= baseShadeMask;

View File

@@ -4,8 +4,6 @@
// Otherwise those parameters are not bound correctly at runtime. // Otherwise those parameters are not bound correctly at runtime.
// =========================================================================== // ===========================================================================
#define fixed half
#define UNITY_TEXTURE_STREAMING_DEBUG_VARS #define UNITY_TEXTURE_STREAMING_DEBUG_VARS
float4 unity_MipmapStreaming_DebugTex_ST; float4 unity_MipmapStreaming_DebugTex_ST;
float4 unity_MipmapStreaming_DebugTex_TexelSize; float4 unity_MipmapStreaming_DebugTex_TexelSize;
@@ -15,293 +13,36 @@ float4 unity_MipmapStreaming_DebugTex_StreamInfo;
// Unity Toon Shader // Unity Toon Shader
#include "UtsTextures.hlsl" #include "UtsTextures.hlsl"
// Lit // TODO: HDRP properties, clean it in the future
TEXTURE2D(_DistortionVectorMap);
SAMPLER(sampler_DistortionVectorMap);
TEXTURE2D(_EmissiveColorMap);
SAMPLER(sampler_EmissiveColorMap);
#ifndef LAYERED_LIT_SHADER #ifndef LAYERED_LIT_SHADER
TEXTURE2D(_DiffuseLightingMap);
SAMPLER(sampler_DiffuseLightingMap);
TEXTURE2D(_BaseColorMap);
SAMPLER(sampler_BaseColorMap);
TEXTURE2D(_HairBlendingMap);
SAMPLER(sampler_HairBlendingMap);
TEXTURE2D(_MaskMap);
SAMPLER(sampler_MaskMap);
TEXTURE2D(_BentNormalMap); // Reuse sampler from normal map
SAMPLER(sampler_BentNormalMap);
TEXTURE2D(_NormalMap);
SAMPLER(sampler_NormalMap);
TEXTURE2D(_NormalMapOS);
SAMPLER(sampler_NormalMapOS);
TEXTURE2D(_DetailMap);
SAMPLER(sampler_DetailMap);
TEXTURE2D(_HeightMap); TEXTURE2D(_HeightMap);
SAMPLER(sampler_HeightMap); SAMPLER(sampler_HeightMap);
TEXTURE2D(_TangentMap);
SAMPLER(sampler_TangentMap);
TEXTURE2D(_TangentMapOS);
SAMPLER(sampler_TangentMapOS);
TEXTURE2D(_AnisotropyMap);
SAMPLER(sampler_AnisotropyMap);
TEXTURE2D(_SubsurfaceMaskMap);
SAMPLER(sampler_SubsurfaceMaskMap);
TEXTURE2D(_ThicknessMap);
SAMPLER(sampler_ThicknessMap);
TEXTURE2D(_IridescenceThicknessMap);
SAMPLER(sampler_IridescenceThicknessMap);
TEXTURE2D(_IridescenceMaskMap);
SAMPLER(sampler_IridescenceMaskMap);
TEXTURE2D(_SpecularColorMap);
SAMPLER(sampler_SpecularColorMap);
TEXTURE2D(_TransmittanceColorMap);
SAMPLER(sampler_TransmittanceColorMap);
TEXTURE2D(_CoatMaskMap);
SAMPLER(sampler_CoatMaskMap);
TEXTURE2D(_SSSLutMap);
//SAMPLER(sampler_SSSLutMap); //Use s_linear_clamp_sampler instead
TEXTURE2D(_HairShadowTex);
TEXTURE2D_X(_HairBlendingTex);
#else
// Set of users variables
#define PROP_DECL(type, name) type name##0, name##1, name##2, name##3
// sampler are share by texture type inside a layered material but we need to support that a particualr layer have no texture, so we take the first sampler of available texture as the share one
// mean we must declare all sampler
#define PROP_DECL_TEX2D(name)\
TEXTURE2D(CALL_MERGE_NAME(name, 0)); \
SAMPLER(CALL_MERGE_NAME(CALL_MERGE_NAME(sampler, name), 0)); \
TEXTURE2D(CALL_MERGE_NAME(name, 1)); \
SAMPLER(CALL_MERGE_NAME(CALL_MERGE_NAME(sampler, name), 1)); \
TEXTURE2D(CALL_MERGE_NAME(name, 2)); \
SAMPLER(CALL_MERGE_NAME(CALL_MERGE_NAME(sampler, name), 2)); \
TEXTURE2D(CALL_MERGE_NAME(name, 3)); \
SAMPLER(CALL_MERGE_NAME(CALL_MERGE_NAME(sampler, name), 3))
PROP_DECL_TEX2D(_BaseColorMap);
PROP_DECL_TEX2D(_MaskMap);
PROP_DECL_TEX2D(_BentNormalMap);
PROP_DECL_TEX2D(_NormalMap);
PROP_DECL_TEX2D(_NormalMapOS);
PROP_DECL_TEX2D(_DetailMap);
PROP_DECL_TEX2D(_HeightMap);
PROP_DECL_TEX2D(_SubsurfaceMaskMap);
PROP_DECL_TEX2D(_ThicknessMap);
TEXTURE2D(_LayerMaskMap);
SAMPLER(sampler_LayerMaskMap);
TEXTURE2D(_LayerInfluenceMaskMap);
SAMPLER(sampler_LayerInfluenceMaskMap);
#endif #endif
CBUFFER_START(UnityPerMaterial) CBUFFER_START(UnityPerMaterial)
#include "UtsUnityPerMaterial.hlsl" #include "UtsUnityPerMaterial.hlsl"
// shared constant between lit and layered lit // TODO: This is for layered lit only, clean it in the future
float _AlphaCutoff;
float _UseShadowThreshold;
float _AlphaCutoffShadow;
float _AlphaCutoffPrepass;
float _AlphaCutoffPostpass;
float4 _DoubleSidedConstants;
float _DistortionScale;
float _DistortionVectorScale;
float _DistortionVectorBias;
float _DistortionBlurScale;
float _DistortionBlurRemapMin;
float _DistortionBlurRemapMax;
float _PPDMaxSamples;
float _PPDMinSamples;
float _PPDLodThreshold;
int _SpecularOcclusionMode;
// Transparency
float3 _TransmittanceColor;
float _Ior;
float _ATDistance;
// Caution: C# code in BaseLitUI.cs call LightmapEmissionFlagsProperty() which assume that there is an existing "_EmissionColor"
// value that exist to identify if the GI emission need to be enabled.
// In our case we don't use such a mechanism but need to keep the code quiet. We declare the value and always enable it.
// TODO: Fix the code in legacy unity so we can customize the beahvior for GI
float3 _EmissionColor;
float4 _EmissiveColorMap_ST;
float _TexWorldScaleEmissive;
float4 _UVMappingMaskEmissive; float4 _UVMappingMaskEmissive;
float4 _InvPrimScale; // Only XY are used // TODO: HDRP properties, clean it in the future
// Wind
float _InitialBend;
float _Stiffness;
float _Drag;
float _ShiverDrag;
float _ShiverDirectionality;
// Specular AA
float _EnableGeometricSpecularAA;
float _SpecularAAScreenSpaceVariance;
float _SpecularAAThreshold;
#ifndef LAYERED_LIT_SHADER #ifndef LAYERED_LIT_SHADER
// Set of users variables
float _Metallic;
float _MetallicRemapMin;
float _MetallicRemapMax;
float _Smoothness;
float _SmoothnessRemapMin;
float _SmoothnessRemapMax;
float _Roughness;
float _RoughnessRemapMin;
float _RoughnessRemapMax;
float _AlphaRemapMin;
float _AlphaRemapMax;
float _AORemapMin;
float _AORemapMax;
float _SSSIntensity;
int _Use_SSSLut;
float4 _SpecularColor;
float _ToonSpecularStep;
float _ToonSpecularFeather;
float _NormalScale;
float4 _DetailMap_ST; float4 _DetailMap_ST;
float _DetailAlbedoScale; float _DetailAlbedoScale;
float _DetailNormalScale; float _DetailNormalScale;
float _DetailSmoothnessScale; float _DetailSmoothnessScale;
float4 _HeightMap_TexelSize; // Unity facility. This will provide the size of the heightmap to the shader
float _HeightAmplitude;
float _HeightCenter;
float _Anisotropy;
float4 _AnisotropyMap_ST;
int _Use_Anisotropy;
float4 _KKColor;
float _BSDFContribution;
float _DiffusionProfileHash; float _DiffusionProfileHash;
float _SubsurfaceMask; float _SubsurfaceMask;
float _TransmissionMask; float _TransmissionMask;
float _Thickness; float _Thickness;
float4 _ThicknessRemap; float4 _ThicknessRemap;
float _IridescenceThickness;
float4 _IridescenceThicknessRemap;
float _IridescenceMask;
float _CoatMask;
//float4 _SpecularColor;
float _EnergyConservingSpecularColor;
float _TexWorldScale; float _TexWorldScale;
float _InvTilingScale; float _InvTilingScale;
float4 _UVMappingMask; float4 _UVMappingMask;
float4 _UVDetailsMappingMask; float4 _UVDetailsMappingMask;
float _LinkDetailsWithBase; float _LinkDetailsWithBase;
float _ObjectSpaceUVMapping; float _ObjectSpaceUVMapping;
#else // LAYERED_LIT_SHADER
// Set of users variables
PROP_DECL(float4, _BaseColor);
float4 _BaseColorMap0_ST;
float4 _BaseColorMap1_ST;
float4 _BaseColorMap2_ST;
float4 _BaseColorMap3_ST;
float4 _BaseColorMap0_TexelSize;
float4 _BaseColorMap0_MipInfo;
PROP_DECL(float, _Metallic);
PROP_DECL(float, _MetallicRemapMin);
PROP_DECL(float, _MetallicRemapMax);
PROP_DECL(float, _Smoothness);
PROP_DECL(float, _SmoothnessRemapMin);
PROP_DECL(float, _SmoothnessRemapMax);
PROP_DECL(float, _AORemapMin);
PROP_DECL(float, _AORemapMax);
PROP_DECL(float, _NormalScale);
float4 _NormalMap0_TexelSize; // Unity facility. This will provide the size of the base normal to the shader
float4 _HeightMap0_TexelSize;
float4 _HeightMap1_TexelSize;
float4 _HeightMap2_TexelSize;
float4 _HeightMap3_TexelSize;
float4 _DetailMap0_ST;
float4 _DetailMap1_ST;
float4 _DetailMap2_ST;
float4 _DetailMap3_ST;
PROP_DECL(float, _UVDetail);
PROP_DECL(float, _DetailAlbedoScale);
PROP_DECL(float, _DetailNormalScale);
PROP_DECL(float, _DetailSmoothnessScale);
PROP_DECL(float, _HeightAmplitude);
PROP_DECL(float, _HeightCenter);
PROP_DECL(float, _DiffusionProfileHash);
PROP_DECL(float, _SubsurfaceMask);
PROP_DECL(float, _Thickness);
PROP_DECL(float4, _ThicknessRemap);
PROP_DECL(float, _OpacityAsDensity);
float _InheritBaseNormal1;
float _InheritBaseNormal2;
float _InheritBaseNormal3;
float _InheritBaseHeight1;
float _InheritBaseHeight2;
float _InheritBaseHeight3;
float _InheritBaseColor1;
float _InheritBaseColor2;
float _InheritBaseColor3;
PROP_DECL(float, _HeightOffset);
float _HeightTransition;
float4 _LayerMaskMap_ST;
float _TexWorldScaleBlendMask;
PROP_DECL(float, _TexWorldScale);
PROP_DECL(float, _InvTilingScale);
float4 _UVMappingMaskBlendMask;
PROP_DECL(float4, _UVMappingMask);
PROP_DECL(float4, _UVDetailsMappingMask);
PROP_DECL(float, _LinkDetailsWithBase);
#endif // LAYERED_LIT_SHADER #endif // LAYERED_LIT_SHADER
// Following two variables are feeded by the C++ Editor for Scene selection // Following two variables are feeded by the C++ Editor for Scene selection
@@ -310,6 +51,7 @@ int _PassValue;
CBUFFER_END CBUFFER_END
// Global
int _ToonLightHiCutFilter; int _ToonLightHiCutFilter;
int _ToonEvAdjustmentCurve; int _ToonEvAdjustmentCurve;
float _ToonEvAdjustmentValueArray[128]; float _ToonEvAdjustmentValueArray[128];

View File

@@ -1,25 +1,47 @@
TEXTURE2D(_MainTex); TEXTURE2D(_MainTex);
SAMPLER(sampler_MainTex); SAMPLER(sampler_MainTex);
// Shading Color
TEXTURE2D(_BaseColorMap);
SAMPLER(sampler_BaseColorMap);
TEXTURE2D(_1stShadeColorMap); TEXTURE2D(_1stShadeColorMap);
TEXTURE2D(_2ndShadeColorMap); TEXTURE2D(_2ndShadeColorMap);
TEXTURE2D_ARRAY(_ShadingRampMap);
TEXTURE2D(_ShadingRampMaskMap);
// Shadow
TEXTURE2D(_SDFShadingMap); TEXTURE2D(_SDFShadingMap);
SAMPLER(sampler_SDFShadingMap); SAMPLER(sampler_SDFShadingMap);
TEXTURE2D_ARRAY(_ShadingRampMap); // Surface Inputs
TEXTURE2D(_ShadingRampMaskMap); TEXTURE2D(_MaskMap);
SAMPLER(sampler_MaskMap);
TEXTURE2D(_NormalMap);
SAMPLER(sampler_NormalMap);
TEXTURE2D(_AnisotropyMap);
SAMPLER(sampler_AnisotropyMap);
TEXTURE2D(_SpecularColorMap);
SAMPLER(sampler_SpecularColorMap);
TEXTURE2D(_SSSLutMap);
TEXTURE2D(_HairBlendingMap);
SAMPLER(sampler_HairBlendingMap);
// Global
TEXTURE2D(_HairShadowTex);
TEXTURE2D_X(_HairBlendingTex);
TEXTURE2D(_IndirectDiffuseMatCapMap); TEXTURE2D(_IndirectDiffuseMatCapMap);
TEXTURE2D(_IndirectSpecularMatCapMap); TEXTURE2D(_IndirectSpecularMatCapMap);
sampler _Set_1st_ShadePosition;
sampler _Set_2nd_ShadePosition;
sampler _HighColor_Tex;
sampler _Set_HighColorMask;
sampler _Set_RimLightMask;
sampler _NormalMapForMatCap;
sampler _Set_MatcapMask;
TEXTURE2D(_ClippingMask); TEXTURE2D(_ClippingMask);
TEXTURE2D(_AngelRingColorMap); TEXTURE2D(_AngelRingColorMap);

View File

@@ -1,5 +1,5 @@
// Light Loop // Surface Option
float3 _ObjectCenterPositionWS; float _SurfaceFeatures;
// Shading Color // Shading Color
float4 _BaseColor; float4 _BaseColor;
@@ -8,12 +8,12 @@ float4 _BaseColorMap_TexelSize;
float4 _BaseColorMap_MipInfo; float4 _BaseColorMap_MipInfo;
float _ShadingIndex; float _ShadingIndex;
fixed _ShadingRampMask; half _ShadingRampMask;
float4 _1stShadeColor; float4 _1stShadeColor;
float4 _2ndShadeColor; float4 _2ndShadeColor;
fixed _UseBaseAs1st; half _UseBaseAs1st;
fixed _Use1stAs2nd; half _Use1stAs2nd;
float _1stShadeColorStep; float _1stShadeColorStep;
float _1stShadeColorFeather; float _1stShadeColorFeather;
@@ -28,10 +28,42 @@ float _SDFHighlightStrength;
float _ShadowDistanceBias; float _ShadowDistanceBias;
float _ShadowNormalBias; float _ShadowNormalBias;
// Emissive // Surface Inputs
float _AlphaRemapMin;
float _AlphaRemapMax;
float _NormalScale;
float _Metallic;
float _MetallicRemapMin;
float _MetallicRemapMax;
float _Smoothness;
float _SmoothnessRemapMin;
float _SmoothnessRemapMax;
float _Roughness;
float _RoughnessRemapMin;
float _RoughnessRemapMax;
float _AORemapMin;
float _AORemapMax;
float _Anisotropy;
float4 _AnisotropyMap_ST;
float4 _KKColor;
float4 _SpecularColor;
float _ToonSpecularStep;
float _ToonSpecularFeather;
float _BSDFContribution;
float _EnergyConservingSpecularColor;
float _SSSIntensity;
int _Use_SSSLut;
float3 _EmissiveColor; float3 _EmissiveColor;
fixed _AlbedoAffectEmissive; half _AlbedoAffectEmissive;
fixed _EmissiveExposureWeight; half _EmissiveExposureWeight;
float _ObjectSpaceUVMappingEmissive; float _ObjectSpaceUVMappingEmissive;
@@ -51,158 +83,47 @@ float _SSRWeight;
float4 _RimLightColor; float4 _RimLightColor;
float _RimLightIntensity; float _RimLightIntensity;
float _RimLightLevel; float _RimLightLevel;
fixed _RimLightClipping; half _RimLightClipping;
float _RimLightClippingLevel; float _RimLightClippingLevel;
float _LightDirectionRimLightLevel; float _LightDirectionRimLightLevel;
// Angle Ring
float4 _AngelRingColor;
float4 _AngelRingColorMap_ST;
float _AngelRingIntensity;
float _AngelRingOffsetU;
float _AngelRingOffsetV;
// Outline // Outline
float _OutlineWidth; float _OutlineWidth;
float4 _OutlineColor; float4 _OutlineColor;
fixed _AlbedoAffectOutline; half _AlbedoAffectOutline;
fixed _SkyColorAffectOutline; half _SkyColorAffectOutline;
float _SkyColorIntensity; float _SkyColorIntensity;
float _OutlineFadeIn; float _OutlineFadeIn;
float _OutlineFadeOut; float _OutlineFadeOut;
fixed _UseSmoothedNormal; half _UseSmoothedNormal;
float _utsTechnique;
float4 _Color;
float _SurfaceFeatures;
float _Tweak_SystemShadowsLevel; float _Tweak_SystemShadowsLevel;
float _EyeParallaxAmount; float _EyeParallaxAmount;
float _HairBlendingFactor; float _HairBlendingFactor;
float _BaseColor_Step; // Advance
float _BaseShade_Feather; half _ClampLightColor;
float4 _Set_1st_ShadePosition_ST;
float _ShadeColor_Step;
float _1st2nd_Shades_Feather;
float4 _Set_2nd_ShadePosition_ST;
float4 _ShadingGradeMap_ST;
float _Tweak_ShadingGradeMapLevel;
fixed _BlurLevelSGM;
//
float4 _HighColor;
float4 _HighColor_Tex_ST;
fixed _Is_LightColor_HighColor;
fixed _Is_NormalMapToHighColor;
float _HighColor_Power;
fixed _Is_SpecularToHighColor;
fixed _Is_BlendAddToHiColor;
fixed _Is_BlendAddToRimColor;
fixed _Is_UseTweakHighColorOnShadow;
float _TweakHighColorOnShadow;
fixed _Is_LightColor_RimLight;
fixed _Is_NormalMapToRimLight;
fixed _LightDirection_MaskOn;
fixed _Add_Antipodean_RimLight;
float4 _Ap_RimLightColor;
fixed _Is_LightColor_Ap_RimLight;
float _Ap_RimLight_Power;
fixed _Ap_RimLight_FeatherOff;
float4 _Set_RimLightMask_ST;
float _Tweak_RimLightMaskLevel;
fixed _MatCap;
float4 _MatCap_Sampler_ST;
float4 _MatCapColor;
fixed _Is_LightColor_MatCap;
fixed _Is_BlendAddToMatCap;
float _Tweak_MatCapUV;
float _Rotate_MatCapUV;
fixed _Is_NormalMapForMatCap;
float4 _NormalMapForMatCap_ST;
float _Rotate_NormalMapForMatCapUV;
fixed _Is_UseTweakMatCapOnShadow;
float _TweakMatCapOnShadow;
float4 _Set_MatcapMask_ST;
float _Tweak_MatcapMaskLevel;
fixed _Is_Ortho;
float _CameraRolling_Stabilizer;
fixed _BlurLevelMatcap;
fixed _Inverse_MatcapMask;
float _BumpScale;
float _BumpScaleMatcap;
float4 _Emissive_Tex_ST;
float4 _Emissive_Color;
fixed _Is_ViewCoord_Scroll;
float _Rotate_EmissiveUV;
float _Base_Speed;
float _Scroll_EmissiveU;
float _Scroll_EmissiveV;
fixed _Is_PingPong_Base;
float4 _ColorShift;
float4 _ViewShift;
float _ColorShift_Speed;
fixed _Is_ColorShift;
fixed _Is_ViewShift;
//
float _Unlit_Intensity;
fixed _Is_Filter_HiCutPointLightColor;
fixed _ClampLightColor;
float _StepOffset;
fixed _Is_BLD;
float _Offset_X_Axis_BLD;
float _Offset_Y_Axis_BLD;
fixed _Inverse_Z_Axis_BLD;
float4 _ClippingMask_ST;
fixed _IsBaseMapAlphaAsClippingMask;
float _Clipping_Level;
fixed _Inverse_Clipping;
float _Tweak_transparency;
fixed _AngelRing;
float _BaseColorVisible;
float _BaseColorOverridden;
float4 _BaseColorMaskColor;
float _FirstShadeVisible;
float _FirstShadeOverridden;
float4 _FirstShadeMaskColor;
float _SecondShadeVisible;
float _SecondShadeOverridden;
float4 _SecondShadeMaskColor;
float _HighlightVisible;
float _HighlightOverridden;
float4 _HighlightMaskColor;
float _AngelRingVisible;
float _AngelRingOverridden;
float4 _AngelRingMaskColor;
float _RimLightVisible;
float _RimLightOverridden;
float4 _RimLightMaskColor;
float _ComposerMaskMode;
int _ClippingMatteMode;
float _GI_Intensity;
float _LightIntensityMultiplier; float _LightIntensityMultiplier;
// Light Loop
float3 _ObjectCenterPositionWS;
float4 _AngelRingColor;
float4 _AngelRingColorMap_ST; // NOTE: Not sure what these are for
float _AngelRingIntensity; // float _FirstShadeOverridden;
float _AngelRingOffsetU; // float _SecondShadeOverridden;
float _AngelRingOffsetV;
float _ComposerMaskMode;
#if defined(_UTS_TOON_EV_PER_MODEL) #if defined(_UTS_TOON_EV_PER_MODEL)
// not in materials // not in materials
@@ -212,7 +133,4 @@ float _ToonEvAdjustmentValueArray[128];
float _ToonEvAdjustmentValueMin; float _ToonEvAdjustmentValueMin;
float _ToonEvAdjustmentValueMax; float _ToonEvAdjustmentValueMax;
float _ToonEvAdjustmentCompensation; float _ToonEvAdjustmentCompensation;
#endif //#if !defined(_UTS_TOON_EV_PER_MODEL) #endif
float _BlendMode;

View File

@@ -68,7 +68,6 @@ void Frag(PackedVaryingsToPS packedInput,
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(packedInput);
FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh); FragInputs input = UnpackVaryingsMeshToFragInputs(packedInput.vmesh);
_Color = _BaseColor;
float4 objPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)); float4 objPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1));
float4 Set_UV0 = input.texCoord0; float4 Set_UV0 = input.texCoord0;