Compare commits
3 Commits
ea3e83157c
...
410af63578
| Author | SHA1 | Date | |
|---|---|---|---|
| 410af63578 | |||
| 5a282e0812 | |||
| b205c1523d |
@@ -19,5 +19,6 @@ namespace Misaki.HdrpToon.Editor
|
|||||||
SceneLight = 1 << 14,
|
SceneLight = 1 << 14,
|
||||||
EnvironmentalLightEffectiveness = 1 << 15,
|
EnvironmentalLightEffectiveness = 1 << 15,
|
||||||
MetaverseSettings = 1 << 16,
|
MetaverseSettings = 1 << 16,
|
||||||
|
Advance = 1 << 17,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
47
Editor/MeterialEditor/UIScopes/AdvanceScope.cs
Normal file
47
Editor/MeterialEditor/UIScopes/AdvanceScope.cs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
using Misaki.ShaderGUI;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
using static Misaki.HdrpToon.UtsShaderPropertyName.Advance;
|
||||||
|
|
||||||
|
namespace Misaki.HdrpToon.Editor
|
||||||
|
{
|
||||||
|
public class AdvanceScope : MaterialUIScope<ShaderGUIExpandable>
|
||||||
|
{
|
||||||
|
private static class Properties
|
||||||
|
{
|
||||||
|
public static MaterialProperty lightIntensityMultiplier;
|
||||||
|
public static MaterialProperty clampLightColor;
|
||||||
|
|
||||||
|
public static MaterialProperty lightLoopMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class Styles
|
||||||
|
{
|
||||||
|
public static readonly GUIContent lightIntensityMultiplierText = new("Light Intensity Multiplier", "Specifies the intensity multiplier of the light.");
|
||||||
|
public static readonly GUIContent clampLightColorText = new("Clamp Light Color", "Specifies whether to clamp the light color.");
|
||||||
|
|
||||||
|
public static readonly GUIContent lightLoopModeText = new("Light Loop Mode", "Specifies the light loop mode.");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ShaderGUIExpandable ExpandableBit => ShaderGUIExpandable.Advance;
|
||||||
|
|
||||||
|
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Advance Settings");
|
||||||
|
|
||||||
|
public override void LoadMaterialProperties()
|
||||||
|
{
|
||||||
|
Properties.lightIntensityMultiplier = FindProperty(LIGHT_INTENSITY_MULTIPLIER);
|
||||||
|
Properties.clampLightColor = FindProperty(CLAMP_LIGHT_COLOR);
|
||||||
|
|
||||||
|
Properties.lightLoopMode = FindProperty(LIGHT_LOOP_MODE);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void DrawContent()
|
||||||
|
{
|
||||||
|
editor.ShaderProperty(Properties.lightIntensityMultiplier, Styles.lightIntensityMultiplierText);
|
||||||
|
editor.ShaderProperty(Properties.clampLightColor, Styles.clampLightColorText);
|
||||||
|
|
||||||
|
editor.ShaderProperty(Properties.lightLoopMode, Styles.lightLoopModeText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
2
Editor/MeterialEditor/UIScopes/AdvanceScope.cs.meta
Normal file
2
Editor/MeterialEditor/UIScopes/AdvanceScope.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3acfee7f0a1007e4bb2a3b42a6282d52
|
||||||
@@ -129,6 +129,7 @@ namespace Misaki.HdrpToon.Editor
|
|||||||
|
|
||||||
if (materials.All(mat => mat.GetPBRMode() == PBRMode.Anisotropy || mat.GetPBRMode() == PBRMode.KKHair))
|
if (materials.All(mat => mat.GetPBRMode() == PBRMode.Anisotropy || mat.GetPBRMode() == PBRMode.KKHair))
|
||||||
{
|
{
|
||||||
|
EditorGUILayout.Space();
|
||||||
editor.KeywordTexturePropertySingleLine(Styles.AnisotropyMapText, Properties.AnisotropyMap, Properties.Anisotropy);
|
editor.KeywordTexturePropertySingleLine(Styles.AnisotropyMapText, Properties.AnisotropyMap, Properties.Anisotropy);
|
||||||
if (materials.All(mat => mat.GetPBRMode() == PBRMode.KKHair))
|
if (materials.All(mat => mat.GetPBRMode() == PBRMode.KKHair))
|
||||||
{
|
{
|
||||||
@@ -142,6 +143,7 @@ namespace Misaki.HdrpToon.Editor
|
|||||||
}
|
}
|
||||||
else if (materials.All(mat => mat.GetPBRMode() == PBRMode.Toon))
|
else if (materials.All(mat => mat.GetPBRMode() == PBRMode.Toon))
|
||||||
{
|
{
|
||||||
|
EditorGUILayout.Space();
|
||||||
editor.KeywordTexturePropertySingleLine(Styles.SpecularColorMapText, Properties.SpecularColorMap, Properties.SpecularColor);
|
editor.KeywordTexturePropertySingleLine(Styles.SpecularColorMapText, Properties.SpecularColorMap, Properties.SpecularColor);
|
||||||
editor.MinMaxShaderProperty(Properties.SpecularFeather, Properties.SpecularStep, 0, 1, Styles.SpecRemap);
|
editor.MinMaxShaderProperty(Properties.SpecularFeather, Properties.SpecularStep, 0, 1, Styles.SpecRemap);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ namespace Misaki.HdrpToon.Editor
|
|||||||
AddUIScope(new RimLightScope());
|
AddUIScope(new RimLightScope());
|
||||||
AddUIScope(new AngelRingScope());
|
AddUIScope(new AngelRingScope());
|
||||||
AddUIScope(new OutlineScope());
|
AddUIScope(new OutlineScope());
|
||||||
|
AddUIScope(new AdvanceScope());
|
||||||
|
|
||||||
Initialize(materialEditor, properties);
|
Initialize(materialEditor, properties);
|
||||||
|
|
||||||
|
|||||||
@@ -69,5 +69,13 @@ namespace Misaki.HdrpToon
|
|||||||
public const string OUTLINE_FADE_OUT = "_OutlineFadeOut";
|
public const string OUTLINE_FADE_OUT = "_OutlineFadeOut";
|
||||||
public const string USE_SMOOTHED_NORMAL = "_UseSmoothedNormal";
|
public const string USE_SMOOTHED_NORMAL = "_UseSmoothedNormal";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class Advance
|
||||||
|
{
|
||||||
|
public const string LIGHT_INTENSITY_MULTIPLIER = "_LightIntensityMultiplier";
|
||||||
|
public const string CLAMP_LIGHT_COLOR = "_ClampLightColor";
|
||||||
|
|
||||||
|
public const string LIGHT_LOOP_MODE = "_Light_Loop_Mode";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,83 +2,7 @@ Shader "HDRP/Toon"
|
|||||||
{
|
{
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
_HeightMap("HeightMap", 2D) = "black" {}
|
//TODO: Use custom rendering data.
|
||||||
// Caution: Default value of _HeightAmplitude must be (_HeightMax - _HeightMin) * 0.01
|
|
||||||
// Those two properties are computed from the ones exposed in the UI and depends on the displaement mode so they are separate because we don't want to lose information upon displacement mode change.
|
|
||||||
[HideInInspector] _HeightAmplitude("Height Amplitude", Float) = 0.02 // In world units. This will be computed in the UI.
|
|
||||||
[HideInInspector] _HeightCenter("Height Center", Range(0.0, 1.0)) = 0.5 // In texture space
|
|
||||||
|
|
||||||
[Enum(MinMax, 0, Amplitude, 1)] _HeightMapParametrization("Heightmap Parametrization", Int) = 0
|
|
||||||
// These parameters are for vertex displacement/Tessellation
|
|
||||||
_HeightOffset("Height Offset", Float) = 0
|
|
||||||
// MinMax mode
|
|
||||||
_HeightMin("Heightmap Min", Float) = -1
|
|
||||||
_HeightMax("Heightmap Max", Float) = 1
|
|
||||||
// Amplitude mode
|
|
||||||
_HeightTessAmplitude("Amplitude", Float) = 2.0 // in Centimeters
|
|
||||||
_HeightTessCenter("Height Center", Range(0.0, 1.0)) = 0.5 // In texture space
|
|
||||||
|
|
||||||
// These parameters are for pixel displacement
|
|
||||||
_HeightPoMAmplitude("Height Amplitude", Float) = 2.0 // In centimeters
|
|
||||||
|
|
||||||
_DetailMap("DetailMap", 2D) = "linearGrey" {}
|
|
||||||
_DetailAlbedoScale("_DetailAlbedoScale", Range(0.0, 2.0)) = 1
|
|
||||||
_DetailNormalScale("_DetailNormalScale", Range(0.0, 2.0)) = 1
|
|
||||||
_DetailSmoothnessScale("_DetailSmoothnessScale", Range(0.0, 2.0)) = 1
|
|
||||||
|
|
||||||
_TangentMap("TangentMap", 2D) = "bump" {}
|
|
||||||
_TangentMapOS("TangentMapOS", 2D) = "white" {}
|
|
||||||
_Anisotropy("Anisotropy", Range(-1.0, 1.0)) = 0
|
|
||||||
_AnisotropyMap("AnisotropyMap", 2D) = "white" {}
|
|
||||||
[ToggleUI] _Use_Anisotropy("Use Anisotropy", int) = 0
|
|
||||||
_KKColor("BaseColor", Color) = (1,1,1,1)
|
|
||||||
_BSDFContribution("_BSDFContribution", Range(0.0,1.0)) = 0
|
|
||||||
|
|
||||||
[HideInInspector] _DiffusionProfile("Obsolete, kept for migration purpose", Int) = 0
|
|
||||||
[HideInInspector] _DiffusionProfileAsset("Diffusion Profile Asset", Vector) = (0, 0, 0, 0)
|
|
||||||
[HideInInspector] _DiffusionProfileHash("Diffusion Profile Hash", Float) = 0
|
|
||||||
_SubsurfaceMask("Subsurface Radius", Range(0.0, 1.0)) = 1.0
|
|
||||||
_SubsurfaceMaskMap("Subsurface Radius Map", 2D) = "white" {}
|
|
||||||
_TransmissionMask("Transmission Mask", Range(0.0, 1.0)) = 1.0
|
|
||||||
_Thickness("Thickness", Range(0.0, 1.0)) = 1.0
|
|
||||||
_ThicknessMap("Thickness Map", 2D) = "white" {}
|
|
||||||
_ThicknessRemap("Thickness Remap", Vector) = (0, 1, 0, 0)
|
|
||||||
|
|
||||||
_IridescenceThickness("Iridescence Thickness", Range(0.0, 1.0)) = 1.0
|
|
||||||
_IridescenceThicknessMap("Iridescence Thickness Map", 2D) = "white" {}
|
|
||||||
_IridescenceThicknessRemap("Iridescence Thickness Remap", Vector) = (0, 1, 0, 0)
|
|
||||||
_IridescenceMask("Iridescence Mask", Range(0.0, 1.0)) = 1.0
|
|
||||||
_IridescenceMaskMap("Iridescence Mask Map", 2D) = "white" {}
|
|
||||||
|
|
||||||
_CoatMask("Coat Mask", Range(0.0, 1.0)) = 0.0
|
|
||||||
_CoatMaskMap("CoatMaskMap", 2D) = "white" {}
|
|
||||||
|
|
||||||
[ToggleUI] _EnergyConservingSpecularColor("_EnergyConservingSpecularColor", Float) = 1.0
|
|
||||||
_SpecularColor("SpecularColor", Color) = (1, 1, 1, 1)
|
|
||||||
_SpecularColorMap("SpecularColorMap", 2D) = "white" {}
|
|
||||||
_ToonSpecularStep("Toon Specular Step", Range(0.0, 1.0)) = 0.5
|
|
||||||
_ToonSpecularFeather("Toon Specular Feather", Range(0.0, 1.0)) = 0.0
|
|
||||||
|
|
||||||
// Following options are for the GUI inspector and different from the input parameters above
|
|
||||||
// These option below will cause different compilation flag.
|
|
||||||
[Enum(Off, 0, From Ambient Occlusion, 1, From Bent Normals, 2)] _SpecularOcclusionMode("Specular Occlusion Mode", Int) = 1
|
|
||||||
|
|
||||||
_DistortionVectorMap("DistortionVectorMap", 2D) = "black" {}
|
|
||||||
[ToggleUI] _DistortionEnable("Enable Distortion", Float) = 0.0
|
|
||||||
[ToggleUI] _DistortionDepthTest("Distortion Depth Test Enable", Float) = 1.0
|
|
||||||
[Enum(Add, 0, Multiply, 1, Replace, 2)] _DistortionBlendMode("Distortion Blend Mode", Int) = 0
|
|
||||||
[HideInInspector] _DistortionSrcBlend("Distortion Blend Src", Int) = 0
|
|
||||||
[HideInInspector] _DistortionDstBlend("Distortion Blend Dst", Int) = 0
|
|
||||||
[HideInInspector] _DistortionBlurSrcBlend("Distortion Blur Blend Src", Int) = 0
|
|
||||||
[HideInInspector] _DistortionBlurDstBlend("Distortion Blur Blend Dst", Int) = 0
|
|
||||||
[HideInInspector] _DistortionBlurBlendMode("Distortion Blur Blend Mode", Int) = 0
|
|
||||||
_DistortionScale("Distortion Scale", Float) = 1
|
|
||||||
_DistortionVectorScale("Distortion Vector Scale", Float) = 2
|
|
||||||
_DistortionVectorBias("Distortion Vector Bias", Float) = -1
|
|
||||||
_DistortionBlurScale("Distortion Blur Scale", Float) = 1
|
|
||||||
_DistortionBlurRemapMin("DistortionBlurRemapMin", Float) = 0.0
|
|
||||||
_DistortionBlurRemapMax("DistortionBlurRemapMax", Float) = 1.0
|
|
||||||
|
|
||||||
[ToggleUI] _UseShadowThreshold("_UseShadowThreshold", Float) = 0.0
|
[ToggleUI] _UseShadowThreshold("_UseShadowThreshold", Float) = 0.0
|
||||||
[ToggleUI] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0
|
[ToggleUI] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0
|
||||||
_AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
|
_AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
|
||||||
@@ -100,8 +24,6 @@ Shader "HDRP/Toon"
|
|||||||
_ATDistance("Transmittance Absorption Distance", Float) = 1.0
|
_ATDistance("Transmittance Absorption Distance", Float) = 1.0
|
||||||
[ToggleUI] _TransparentWritingMotionVec("_TransparentWritingMotionVec", Float) = 0.0
|
[ToggleUI] _TransparentWritingMotionVec("_TransparentWritingMotionVec", Float) = 0.0
|
||||||
|
|
||||||
// Stencil state
|
|
||||||
|
|
||||||
// Forward
|
// Forward
|
||||||
[HideInInspector] _StencilRef("_StencilRef", Int) = 2 // StencilLightingUsage.RegularLighting
|
[HideInInspector] _StencilRef("_StencilRef", Int) = 2 // StencilLightingUsage.RegularLighting
|
||||||
[HideInInspector] _StencilWriteMask("_StencilWriteMask", Int) = 3 // StencilMask.Lighting
|
[HideInInspector] _StencilWriteMask("_StencilWriteMask", Int) = 3 // StencilMask.Lighting
|
||||||
@@ -143,57 +65,13 @@ Shader "HDRP/Toon"
|
|||||||
[Enum(Flip, 0, Mirror, 1, None, 2)] _DoubleSidedNormalMode("Double sided normal mode", Float) = 1
|
[Enum(Flip, 0, Mirror, 1, None, 2)] _DoubleSidedNormalMode("Double sided normal mode", Float) = 1
|
||||||
[HideInInspector] _DoubleSidedConstants("_DoubleSidedConstants", Vector) = (1, 1, -1, 0)
|
[HideInInspector] _DoubleSidedConstants("_DoubleSidedConstants", Vector) = (1, 1, -1, 0)
|
||||||
|
|
||||||
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase("UV Set for base", Float) = 0
|
|
||||||
[Enum(WorldSpace, 0, ObjectSpace, 1)] _ObjectSpaceUVMapping("Mapping space", Float) = 0.0
|
|
||||||
_TexWorldScale("Scale to apply on world coordinate", Float) = 1.0
|
|
||||||
[HideInInspector] _InvTilingScale("Inverse tiling scale = 2 / (abs(_BaseColorMap_ST.x) + abs(_BaseColorMap_ST.y))", Float) = 1
|
|
||||||
[HideInInspector] _UVMappingMask("_UVMappingMask", Color) = (1, 0, 0, 0)
|
[HideInInspector] _UVMappingMask("_UVMappingMask", Color) = (1, 0, 0, 0)
|
||||||
[Enum(TangentSpace, 0, ObjectSpace, 1)] _NormalMapSpace("NormalMap space", Float) = 0
|
|
||||||
|
|
||||||
// Following enum should be material feature flags (i.e bitfield), however due to Gbuffer encoding constrain many combination exclude each other
|
|
||||||
// so we use this enum as "material ID" which can be interpreted as preset of bitfield of material feature
|
|
||||||
// The only material feature flag that can be added in all cases is clear coat
|
|
||||||
[Enum(Subsurface Scattering, 0, Standard, 1, Anisotropy, 2, Iridescence, 3, Specular Color, 4, Translucent, 5)] _MaterialID("MaterialId", Int) = 1 // MaterialId.Standard
|
|
||||||
[ToggleUI] _TransmissionEnable("_TransmissionEnable", Float) = 1.0
|
|
||||||
|
|
||||||
[Enum(None, 0, Vertex displacement, 1, Pixel displacement, 2)] _DisplacementMode("DisplacementMode", Int) = 0
|
|
||||||
[ToggleUI] _DisplacementLockObjectScale("displacement lock object scale", Float) = 1.0
|
|
||||||
[ToggleUI] _DisplacementLockTilingScale("displacement lock tiling scale", Float) = 1.0
|
|
||||||
[ToggleUI] _DepthOffsetEnable("Depth Offset View space", Float) = 0.0
|
|
||||||
|
|
||||||
[ToggleUI] _EnableGeometricSpecularAA("EnableGeometricSpecularAA", Float) = 0.0
|
|
||||||
_SpecularAAScreenSpaceVariance("SpecularAAScreenSpaceVariance", Range(0.0, 1.0)) = 0.1
|
|
||||||
_SpecularAAThreshold("SpecularAAThreshold", Range(0.0, 1.0)) = 0.2
|
|
||||||
|
|
||||||
_PPDMinSamples("Min sample for POM", Range(1.0, 64.0)) = 5
|
|
||||||
_PPDMaxSamples("Max sample for POM", Range(1.0, 64.0)) = 15
|
|
||||||
_PPDLodThreshold("Start lod to fade out the POM effect", Range(0.0, 16.0)) = 5
|
|
||||||
_PPDPrimitiveLength("Primitive length for POM", Float) = 1
|
|
||||||
_PPDPrimitiveWidth("Primitive width for POM", Float) = 1
|
|
||||||
[HideInInspector] _InvPrimScale("Inverse primitive scale for non-planar POM", Vector) = (1, 1, 0, 0)
|
|
||||||
|
|
||||||
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _UVDetail("UV Set for detail", Float) = 0
|
|
||||||
[HideInInspector] _UVDetailsMappingMask("_UVDetailsMappingMask", Color) = (1, 0, 0, 0)
|
|
||||||
[ToggleUI] _LinkDetailsWithBase("LinkDetailsWithBase", Float) = 1.0
|
|
||||||
|
|
||||||
[Enum(Use Emissive Color, 0, Use Emissive Mask, 1)] _EmissiveColorMode("Emissive color mode", Float) = 1
|
|
||||||
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVEmissive("UV Set for emissive", Float) = 0
|
|
||||||
_TexWorldScaleEmissive("Scale to apply on world coordinate", Float) = 1.0
|
|
||||||
[HideInInspector] _UVMappingMaskEmissive("_UVMappingMaskEmissive", Color) = (1, 0, 0, 0)
|
|
||||||
|
|
||||||
// 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
|
|
||||||
_EmissionColor("Color", Color) = (1, 1, 1)
|
|
||||||
|
|
||||||
// HACK: GI Baking system relies on some properties existing in the shader ("_MainTex", "_Cutoff" and "_Color") for opacity handling, so we need to store our version of those parameters in the hard-coded name the GI baking system recognizes.
|
// HACK: GI Baking system relies on some properties existing in the shader ("_MainTex", "_Cutoff" and "_Color") for opacity handling, so we need to store our version of those parameters in the hard-coded name the GI baking system recognizes.
|
||||||
_MainTex("Base Map", 2D) = "white" {}
|
_MainTex("Base Map", 2D) = "white" {}
|
||||||
_Color("Color", Color) = (1,1,1,1)
|
_Color("Color", Color) = (1,1,1,1)
|
||||||
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
|
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
|
||||||
|
|
||||||
[ToggleUI] _SupportDecals("Support Decals", Float) = 1.0
|
|
||||||
[ToggleUI] _AddPrecomputedVelocity("AddPrecomputedVelocity", Float) = 0.0
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
@@ -203,6 +81,7 @@ Shader "HDRP/Toon"
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
//NOTE: UTS properties
|
||||||
//TODO: Move more properties here for better organization
|
//TODO: Move more properties here for better organization
|
||||||
|
|
||||||
// Surface Options
|
// Surface Options
|
||||||
@@ -212,7 +91,7 @@ Shader "HDRP/Toon"
|
|||||||
[Enum(Off, 0, Front, 1, Back, 2)] _CullMode("Cull Mode", Integer) = 2
|
[Enum(Off, 0, Front, 1, Back, 2)] _CullMode("Cull Mode", Integer) = 2
|
||||||
[KeywordEnum(Standard, SDF)] _Shading_Mode("Shading mode", Integer) = 0
|
[KeywordEnum(Standard, SDF)] _Shading_Mode("Shading mode", Integer) = 0
|
||||||
[KeywordEnum(Standard, FrontHair, Face, Eye)] _Material_Type("Material Type", Integer) = 0
|
[KeywordEnum(Standard, FrontHair, Face, Eye)] _Material_Type("Material Type", Integer) = 0
|
||||||
[KeywordEnum(Off, Standard, Anisotropy, KKHair, Toon)] _PBR_Mode("PBR Mode", Integer) = 0
|
[KeywordEnum(Off, Standard, Anisotropy, Hair, Toon)] _PBR_Mode("PBR Mode", Integer) = 0
|
||||||
[PassPopup(HairBlendingTarget)] _HairBlendingTarget("Hair Blending Target", Integer) = 0
|
[PassPopup(HairBlendingTarget)] _HairBlendingTarget("Hair Blending Target", Integer) = 0
|
||||||
[EnumFlagsUI(Misaki.HdrpToon.SurfaceFeature, Misaki.HdrpToon)]_SurfaceFeatures("Surface Features", Integer) = 0
|
[EnumFlagsUI(Misaki.HdrpToon.SurfaceFeature, Misaki.HdrpToon)]_SurfaceFeatures("Surface Features", Integer) = 0
|
||||||
|
|
||||||
@@ -268,9 +147,18 @@ Shader "HDRP/Toon"
|
|||||||
_AlphaRemapMax("AlphaRemapMax", Float) = 1.0
|
_AlphaRemapMax("AlphaRemapMax", Float) = 1.0
|
||||||
_AORemapMin("AORemapMin", Float) = 0.0
|
_AORemapMin("AORemapMin", Float) = 0.0
|
||||||
_AORemapMax("AORemapMax", Float) = 1.0
|
_AORemapMax("AORemapMax", Float) = 1.0
|
||||||
[ToggleUI] _Use_SSSLut("Use SSSLut", Integer) = 0
|
|
||||||
_SSSLutMap("SSSLutMap", 2D) = "white" {}
|
_Anisotropy("Anisotropy", Range(-1.0, 1.0)) = 0
|
||||||
_SSSIntensity("SSSIntensity", Range(0.0, 3.0)) = 1.0
|
_AnisotropyMap("AnisotropyMap", 2D) = "white" {}
|
||||||
|
|
||||||
|
_KKColor("BaseColor", Color) = (1,1,1,1)
|
||||||
|
_BSDFContribution("_BSDFContribution", Range(0.0,1.0)) = 0
|
||||||
|
|
||||||
|
[ToggleUI] _EnergyConservingSpecularColor("_EnergyConservingSpecularColor", Float) = 1.0
|
||||||
|
_SpecularColor("SpecularColor", Color) = (1, 1, 1, 1)
|
||||||
|
_SpecularColorMap("SpecularColorMap", 2D) = "white" {}
|
||||||
|
_ToonSpecularStep("Toon Specular Step", Range(0.0, 1.0)) = 0.5
|
||||||
|
_ToonSpecularFeather("Toon Specular Feather", Range(0.0, 1.0)) = 0.0
|
||||||
|
|
||||||
_HairBlendingMap("HairBlendingMap", 2D) = "black" {}
|
_HairBlendingMap("HairBlendingMap", 2D) = "black" {}
|
||||||
|
|
||||||
@@ -285,8 +173,6 @@ Shader "HDRP/Toon"
|
|||||||
[ToggleUI] _AlbedoAffectEmissive("Albedo Affect Emissive", Float) = 0.0
|
[ToggleUI] _AlbedoAffectEmissive("Albedo Affect Emissive", Float) = 0.0
|
||||||
_EmissiveExposureWeight("Emissive Pre Exposure", Range(0.0, 1.0)) = 1.0
|
_EmissiveExposureWeight("Emissive Pre Exposure", Range(0.0, 1.0)) = 1.0
|
||||||
|
|
||||||
[Enum(WorldSpace, 0, ObjectSpace, 1)] _ObjectSpaceUVMappingEmissive("Mapping space", Float) = 0.0
|
|
||||||
|
|
||||||
// Ambient
|
// Ambient
|
||||||
[KeywordEnum(Off, IBL, MatCap, Ramp)]_Indirect_Diffuse_Mode("_Indirect_Diffuse_Mode", Integer) = 1
|
[KeywordEnum(Off, IBL, MatCap, Ramp)]_Indirect_Diffuse_Mode("_Indirect_Diffuse_Mode", Integer) = 1
|
||||||
[KeywordEnum(Off, IBL, MatCap)]_Indirect_Specular_Mode("_Indirect_Specular_Mode", Integer) = 1
|
[KeywordEnum(Off, IBL, MatCap)]_Indirect_Specular_Mode("_Indirect_Specular_Mode", Integer) = 1
|
||||||
@@ -305,10 +191,6 @@ Shader "HDRP/Toon"
|
|||||||
_SSRWeight("SSR Weight", Range(0.0, 1.0)) = 1.0
|
_SSRWeight("SSR Weight", Range(0.0, 1.0)) = 1.0
|
||||||
|
|
||||||
// Rim Light
|
// Rim Light
|
||||||
//_Set_HighColorMask("Set_HighColorMask", 2D) = "white" {}
|
|
||||||
//_Tweak_HighColorMaskLevel("Tweak_HighColorMaskLevel", Range(-1, 1)) = 0
|
|
||||||
//[Toggle(_)] _RimLight("RimLight", Float) = 0
|
|
||||||
|
|
||||||
_RimLightColor("Rim Light Color", Color) = (1, 1, 1, 1)
|
_RimLightColor("Rim Light Color", Color) = (1, 1, 1, 1)
|
||||||
_RimLightIntensity("Rim Light Intensity", Range(0, 10)) = 1
|
_RimLightIntensity("Rim Light Intensity", Range(0, 10)) = 1
|
||||||
[Popup] _Screen_Space_Rim_Light ("Screen Space Rim Light", Integer) = 0
|
[Popup] _Screen_Space_Rim_Light ("Screen Space Rim Light", Integer) = 0
|
||||||
@@ -353,171 +235,10 @@ Shader "HDRP/Toon"
|
|||||||
_OutlineFadeOut("Outline Fade Out", Float) = 100
|
_OutlineFadeOut("Outline Fade Out", Float) = 100
|
||||||
[ToggleUI] _UseSmoothedNormal("Use Smoothed Normal", Float) = 0
|
[ToggleUI] _UseSmoothedNormal("Use Smoothed Normal", Float) = 0
|
||||||
|
|
||||||
|
// Advance
|
||||||
|
_LightIntensityMultiplier("Light_Intensity_Multiplier" , Range(0, 1)) = 0.5
|
||||||
|
[ToggleUI] _ClampLightColor("VRChat : SceneLights HiCut_Filter", Float) = 0
|
||||||
//TODO: End Section
|
[KeywordEnum(Single, Full, Custom)] _Light_Loop_Mode ("Light Loop Mode", Float) = 1
|
||||||
|
|
||||||
[Toggle(_)] _Cast_Hair_Shadow("CastHairShadow", Float) = 0
|
|
||||||
|
|
||||||
[HideInInspector] _utsTechnique("Technique", int) = 0 //DWF
|
|
||||||
|
|
||||||
[HideInInspector] _AutoRenderQueue("Automatic Render Queue ", int) = 1
|
|
||||||
[Enum(Off, 0, StencilOut, 1, StencilMask, 2)] _StencilMode("StencilMode", int) = 0
|
|
||||||
// these are set in UniversalToonGUI.cs in accordance with _StencilMode
|
|
||||||
_StencilComp("Stencil Comparison", Float) = 8
|
|
||||||
_StencilNo("Stencil No", Float) = 1
|
|
||||||
_StencilOpPass("Stencil Operation", Float) = 0
|
|
||||||
_StencilOpFail("Stencil Operation", Float) = 0
|
|
||||||
|
|
||||||
// DoubleShadeWithFeather
|
|
||||||
// 0:_IS_CLIPPING_OFF 1:_IS_CLIPPING_MODE 2:_IS_CLIPPING_TRANSMODE
|
|
||||||
// ShadingGradeMap
|
|
||||||
// 0:_IS_TRANSCLIPPING_OFF 1:_IS_TRANSCLIPPING_ON
|
|
||||||
[Enum(Off, 0, ON, 1, TRANSMODE, 2)] _ClippingMode("CliippingMode", int) = 0
|
|
||||||
|
|
||||||
[Enum(Off, 0, ONT, 1)] _ZWriteMode("ZWrite Mode", int) = 1 //OFF/ON
|
|
||||||
[Enum(Off, 0, ONT, 1)] _ZOverDrawMode("ZOver Draw Mode", Float) = 0 //OFF/ON
|
|
||||||
_SPRDefaultUnlitColorMask("SPRDefaultUnlit Path Color Mask", int) = 15
|
|
||||||
[Enum(Off, 0, FRONT, 1, BACK, 2)] _SRPDefaultUnlitColMode("SPRDefaultUnlit Cull Mode", int) = 1 //OFF/FRONT/BACK
|
|
||||||
// ClippingMask paramaters from Here.
|
|
||||||
_ClippingMask("ClippingMask", 2D) = "white" {}
|
|
||||||
//v.2.0.4
|
|
||||||
[HideInInspector] _IsBaseMapAlphaAsClippingMask("IsBaseMapAlphaAsClippingMask", Float) = 0
|
|
||||||
//
|
|
||||||
[Toggle(_)] _Inverse_Clipping("Inverse_Clipping", Float) = 0
|
|
||||||
_Clipping_Level("Clipping_Level", Range(0, 1)) = 0
|
|
||||||
_Tweak_transparency("Tweak_transparency", Range(-1, 1)) = 0
|
|
||||||
// ClippingMask paramaters to Here.
|
|
||||||
|
|
||||||
// _MainTex("BaseMap", 2D) = "white" {}
|
|
||||||
[HideInInspector] _BaseMap("BaseMap", 2D) = "white" {}
|
|
||||||
_BaseColor("BaseColor", Color) = (1, 1, 1, 1)
|
|
||||||
//v.2.0.5 : Clipping/TransClipping for SSAO Problems in PostProcessing Stack.
|
|
||||||
//If you want to go back the former SSAO results, comment out the below line.
|
|
||||||
[HideInInspector] _Color("Color", Color) = (1, 1, 1, 1)
|
|
||||||
|
|
||||||
// _NormalMap("NormalMap", 2D) = "bump" {}
|
|
||||||
_BumpScale("Normal Scale", Range(0, 1)) = 1
|
|
||||||
[Toggle(_)] _Is_NormalMapToBase("Is_NormalMapToBase", Float) = 0
|
|
||||||
|
|
||||||
|
|
||||||
// Eye Parallax
|
|
||||||
[Toggle(_)] _Is_EyeParallax("_Is_EyeParallax", Float) = 0
|
|
||||||
_EyeParallaxAmount("EyeParallaxAmount", Float) = 0.1
|
|
||||||
|
|
||||||
// Eyebrow Seethrough
|
|
||||||
_HairBlendingFactor("EyeBrowBlendingFactor", Float) = 0.5
|
|
||||||
|
|
||||||
//v.2.0.6
|
|
||||||
_BaseColor_Step("BaseColor_Step", Range(0, 1)) = 0.5
|
|
||||||
_BaseShade_Feather("Base/Shade_Feather", Range(0.0001, 1)) = 0.0001
|
|
||||||
_ShadeColor_Step("ShadeColor_Step", Range(0, 1)) = 0
|
|
||||||
_1st2nd_Shades_Feather("1st/2nd_Shades_Feather", Range(0.0001, 1)) = 0.0001
|
|
||||||
|
|
||||||
//v.2.0.5
|
|
||||||
_StepOffset("Step_Offset (ForwardAdd Only)", Range(-0.5, 0.5)) = 0
|
|
||||||
[Toggle(_)] _Is_Filter_HiCutPointLightColor("PointLights HiCut_Filter (ForwardAdd Only)", Float) = 1
|
|
||||||
//
|
|
||||||
_Set_1st_ShadePosition("Set_1st_ShadePosition", 2D) = "white" {}
|
|
||||||
_Set_2nd_ShadePosition("Set_2nd_ShadePosition", 2D) = "white" {}
|
|
||||||
//v.2.0.6
|
|
||||||
_Tweak_ShadingGradeMapLevel("Tweak_ShadingGradeMapLevel", Range(-0.5, 0.5)) = 0
|
|
||||||
_BlurLevelSGM("Blur Level of ShadingGradeMap", Range(0, 10)) = 0
|
|
||||||
|
|
||||||
//
|
|
||||||
_HighColor("HighColor", Color) = (0, 0, 0, 1)
|
|
||||||
//v.2.0.4 HighColor_Tex
|
|
||||||
_HighColor_Tex("HighColor_Tex", 2D) = "white" {}
|
|
||||||
[Toggle(_)] _Is_LightColor_HighColor("Is_LightColor_HighColor", Float) = 1
|
|
||||||
[Toggle(_)] _Is_NormalMapToHighColor("Is_NormalMapToHighColor", Float) = 0
|
|
||||||
_HighColor_Power("HighColor_Power", Range(0, 1)) = 0
|
|
||||||
[Toggle(_)] _Is_SpecularToHighColor("Is_SpecularToHighColor", Float) = 0
|
|
||||||
[Toggle(_)] _Is_BlendAddToHiColor("Is_BlendAddToHiColor", Float) = 0
|
|
||||||
[Enum(Multiply,0, Add,1)] _Is_BlendAddToRimColor("Is_BlendAddToRimColor", Float) = 1
|
|
||||||
[Toggle(_)] _Is_UseTweakHighColorOnShadow("Is_UseTweakHighColorOnShadow", Float) = 0
|
|
||||||
_TweakHighColorOnShadow("TweakHighColorOnShadow", Range(0, 1)) = 0
|
|
||||||
|
|
||||||
[Toggle(_)] _MatCap("MatCap", Float) = 0
|
|
||||||
//v.2.0.6
|
|
||||||
_BlurLevelMatcap("Blur Level of MatCap_Sampler", Range(0, 10)) = 0
|
|
||||||
_MatCapColor("MatCapColor", Color) = (1, 1, 1, 1)
|
|
||||||
[Toggle(_)] _Is_LightColor_MatCap("Is_LightColor_MatCap", Float) = 1
|
|
||||||
[Toggle(_)] _Is_BlendAddToMatCap("Is_BlendAddToMatCap", Float) = 1
|
|
||||||
_Tweak_MatCapUV("Tweak_MatCapUV", Range(-0.5, 0.5)) = 0
|
|
||||||
_Rotate_MatCapUV("Rotate_MatCapUV", Range(-1, 1)) = 0
|
|
||||||
//v.2.0.6
|
|
||||||
[Toggle(_)] _CameraRolling_Stabilizer("Activate CameraRolling_Stabilizer", Float) = 0
|
|
||||||
[Toggle(_)] _Is_NormalMapForMatCap("Is_NormalMapForMatCap", Float) = 0
|
|
||||||
_NormalMapForMatCap("NormalMapForMatCap", 2D) = "bump" {}
|
|
||||||
_BumpScaleMatcap("Scale for NormalMapforMatCap", Range(0, 1)) = 1
|
|
||||||
_Rotate_NormalMapForMatCapUV("Rotate_NormalMapForMatCapUV", Range(-1, 1)) = 0
|
|
||||||
[Toggle(_)] _Is_UseTweakMatCapOnShadow("Is_UseTweakMatCapOnShadow", Float) = 0
|
|
||||||
_TweakMatCapOnShadow("TweakMatCapOnShadow", Range(0, 1)) = 0
|
|
||||||
//MatcapMask
|
|
||||||
_Set_MatcapMask("Set_MatcapMask", 2D) = "white" {}
|
|
||||||
_Tweak_MatcapMaskLevel("Tweak_MatcapMaskLevel", Range(-1, 1)) = 0
|
|
||||||
[Toggle(_)] _Inverse_MatcapMask("Inverse_MatcapMask", Float) = 0
|
|
||||||
//v.2.0.5
|
|
||||||
[Toggle(_)] _Is_Ortho("Orthographic Projection for MatCap", Float) = 0
|
|
||||||
|
|
||||||
//
|
|
||||||
//v.2.0.7 Emissive
|
|
||||||
[KeywordEnum(SIMPLE, ANIMATION)] _EMISSIVE("EMISSIVE MODE", Float) = 0
|
|
||||||
_Base_Speed("Base_Speed", Float) = 0
|
|
||||||
_Scroll_EmissiveU("Scroll_EmissiveU", Range(-1, 1)) = 0
|
|
||||||
_Scroll_EmissiveV("Scroll_EmissiveV", Range(-1, 1)) = 0
|
|
||||||
_Rotate_EmissiveUV("Rotate_EmissiveUV", Float) = 0
|
|
||||||
[Toggle(_)] _Is_PingPong_Base("Is_PingPong_Base", Float) = 0
|
|
||||||
[Toggle(_)] _Is_ColorShift("Activate ColorShift", Float) = 0
|
|
||||||
[HDR]_ColorShift("ColorSift", Color) = (0, 0, 0, 1)
|
|
||||||
_ColorShift_Speed("ColorShift_Speed", Float) = 0
|
|
||||||
[Toggle(_)] _Is_ViewShift("Activate ViewShift", Float) = 0
|
|
||||||
[HDR]_ViewShift("ViewSift", Color) = (0, 0, 0, 1)
|
|
||||||
[Toggle(_)] _Is_ViewCoord_Scroll("Is_ViewCoord_Scroll", Float) = 0
|
|
||||||
//
|
|
||||||
//GI Intensity
|
|
||||||
_Light_Intensity_Multiplier("Light_Intensity_Multiplier" , Range(0, 1)) = 0.25
|
|
||||||
//For VR Chat under No effective light objects
|
|
||||||
_Unlit_Intensity("Unlit_Intensity", Range(0, 4)) = 0
|
|
||||||
//v.2.0.5
|
|
||||||
[Toggle(_)] _Is_Filter_LightColor("VRChat : SceneLights HiCut_Filter", Float) = 0
|
|
||||||
//Built-in Light Direction
|
|
||||||
[Toggle(_)] _Is_BLD("Advanced : Activate Built-in Light Direction", Float) = 0
|
|
||||||
_Offset_X_Axis_BLD(" Offset X-Axis (Built-in Light Direction)", Range(-1, 1)) = -0.05
|
|
||||||
_Offset_Y_Axis_BLD(" Offset Y-Axis (Built-in Light Direction)", Range(-1, 1)) = 0.09
|
|
||||||
[Toggle(_)] _Inverse_Z_Axis_BLD(" Inverse Z-Axis (Built-in Light Direction)", Float) = 1
|
|
||||||
|
|
||||||
[Toggle(_)] _BaseColorVisible("Channel mask", Float) = 1
|
|
||||||
[Toggle(_)] _BaseColorOverridden("Channel mask", Float) = 0
|
|
||||||
_BaseColorMaskColor("chennel mask color", Color) = (1, 1, 1, 1)
|
|
||||||
|
|
||||||
[Toggle(_)] _FirstShadeVisible("Channel mask", Float) = 1
|
|
||||||
[Toggle(_)] _FirstShadeOverridden("Channel mask", Float) = 0
|
|
||||||
_FirstShadeMaskColor("chennel mask color", Color) = (0, 1, 1, 1)
|
|
||||||
|
|
||||||
[Toggle(_)] _SecondShadeVisible("Channel mask", Float) = 1
|
|
||||||
[Toggle(_)] _SecondShadeOverridden("Channel mask", Float) = 0
|
|
||||||
_SecondShadeMaskColor("chennel mask color", Color) = (0, 0, 1, 1)
|
|
||||||
|
|
||||||
[Toggle(_)] _HighlightVisible("Channel mask", Float) = 1
|
|
||||||
[Toggle(_)] _HighlightOverridden("Channel mask", Float) = 0
|
|
||||||
_HighlightMaskColor("Channel mask color", Color) = (1, 1, 0, 1)
|
|
||||||
|
|
||||||
[Toggle(_)] _AngelRingVisible("Channel mask", Float) = 1
|
|
||||||
[Toggle(_)] _AngelRingOverridden("Channel mask", Float) = 0
|
|
||||||
_AngelRingMaskColor("Channel mask color", Color) = (0, 1, 0, 1)
|
|
||||||
|
|
||||||
[Toggle(_)] _RimLightVisible("Channel mask", Float) = 1
|
|
||||||
[Toggle(_)] _RimLightOverridden("Channel mask", Float) = 0
|
|
||||||
_RimLightMaskColor("Channel mask color", Color) = (1, 0, 1, 1)
|
|
||||||
|
|
||||||
[Toggle(_)] _ComposerMaskMode("", Float) = 0
|
|
||||||
[Enum(None, 0, BaseColor, 1, FirstShade, 2, SecondShade,3, Highlight, 4, AngelRing, 5, RimLight, 6)] _ClippingMatteMode("Clipping Matte Mode", int) = 0
|
|
||||||
|
|
||||||
[KeywordEnum(NONE, SINGLE, FULL)] _Light_Loop_Mode ("Light Loop Mode", Float) = 2
|
|
||||||
//
|
|
||||||
// to here parameters for UTS>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HLSLINCLUDE
|
HLSLINCLUDE
|
||||||
@@ -550,10 +271,6 @@ Shader "HDRP/Toon"
|
|||||||
//enable GPU instancing support
|
//enable GPU instancing support
|
||||||
#pragma multi_compile_instancing
|
#pragma multi_compile_instancing
|
||||||
#pragma instancing_options renderinglayer
|
#pragma instancing_options renderinglayer
|
||||||
// enable debug shado
|
|
||||||
// #pragma multi_compile _ UTS_DEBUG_SELFSHADOW
|
|
||||||
// #pragma multi_compile _ UTS_DEBUG_SHADOWMAP
|
|
||||||
// #pragma multi_compile _ UTS_DEBUG_SHADOWMAP_NO_OUTLINE
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------
|
||||||
// Define
|
// Define
|
||||||
@@ -959,7 +676,6 @@ Shader "HDRP/Toon"
|
|||||||
|
|
||||||
Pass
|
Pass
|
||||||
{
|
{
|
||||||
|
|
||||||
Name "ForwardOnly"
|
Name "ForwardOnly"
|
||||||
Tags { "LightMode" = "ForwardOnly" }
|
Tags { "LightMode" = "ForwardOnly" }
|
||||||
|
|
||||||
@@ -977,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
|
||||||
@@ -1016,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
|
||||||
|
|||||||
@@ -679,8 +679,8 @@ void Frag(PackedVaryingsToPS packedInput,
|
|||||||
lightDirection = lerp(lightDirection, customLightDirection, _Is_BLD);
|
lightDirection = lerp(lightDirection, customLightDirection, _Is_BLD);
|
||||||
float3 originalLightColor = customMainLight.lightColor.rgb;
|
float3 originalLightColor = customMainLight.lightColor.rgb;
|
||||||
|
|
||||||
originalLightColor = lerp(originalLightColor, clamp(originalLightColor, ConvertFromEV100(_ToonEvAdjustmentValueMin ), ConvertFromEV100(_ToonEvAdjustmentValueMax)), _ToonEvAdjustmentCurve) * _Light_Intensity_Multiplier;
|
originalLightColor = lerp(originalLightColor, clamp(originalLightColor, ConvertFromEV100(_ToonEvAdjustmentValueMin ), ConvertFromEV100(_ToonEvAdjustmentValueMax)), _ToonEvAdjustmentCurve) * _LightIntensityMultiplier;
|
||||||
float3 lightColor = lerp(max(defaultLightColor, originalLightColor), max(defaultLightColor, saturate(originalLightColor)), max(_Is_Filter_LightColor, _ToonLightHiCutFilter));
|
float3 lightColor = lerp(max(defaultLightColor, originalLightColor), max(defaultLightColor, saturate(originalLightColor)), max(_ClampLightColor, _ToonLightHiCutFilter));
|
||||||
|
|
||||||
float4 _1st_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_1st_ShadeMap, sampler_BaseColorMap,TRANSFORM_TEX(Set_UV0, _1st_ShadeMap)), _MainTex_var, _Use_BaseAs1st);
|
float4 _1st_ShadeMap_var = lerp(SAMPLE_TEXTURE2D(_1st_ShadeMap, sampler_BaseColorMap,TRANSFORM_TEX(Set_UV0, _1st_ShadeMap)), _MainTex_var, _Use_BaseAs1st);
|
||||||
float3 _1st_Shade_var = lerp((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb), ((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb) * lightColor), _Is_LightColor_1st_Shade);
|
float3 _1st_Shade_var = lerp((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb), ((_1st_ShadeMap_var.rgb * _1st_ShadeColor.rgb) * lightColor), _Is_LightColor_1st_Shade);
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ void UTS_MainLight(LightLoopContext lightLoopContext, FragInputs input, UTSLight
|
|||||||
float3 originalLightColor = mainLightColor.rgb;
|
float3 originalLightColor = mainLightColor.rgb;
|
||||||
|
|
||||||
originalLightColor = lerp(originalLightColor, clamp(originalLightColor, ConvertFromEV100(_ToonEvAdjustmentValueMin), ConvertFromEV100(_ToonEvAdjustmentValueMax)), _ToonEvAdjustmentCurve);
|
originalLightColor = lerp(originalLightColor, clamp(originalLightColor, ConvertFromEV100(_ToonEvAdjustmentValueMin), ConvertFromEV100(_ToonEvAdjustmentValueMax)), _ToonEvAdjustmentCurve);
|
||||||
float3 lightColor = lerp(max(defaultLightColor, originalLightColor), max(defaultLightColor, saturate(originalLightColor)), max(_Is_Filter_LightColor, _ToonLightHiCutFilter)) * _Light_Intensity_Multiplier;
|
float3 lightColor = lerp(max(defaultLightColor, originalLightColor), max(defaultLightColor, saturate(originalLightColor)), max(_ClampLightColor, _ToonLightHiCutFilter)) * _LightIntensityMultiplier;
|
||||||
|
|
||||||
////// Lighting:
|
////// Lighting:
|
||||||
float3 halfDirection = normalize(utsData.viewDirection + lightDirection);
|
float3 halfDirection = normalize(utsData.viewDirection + lightDirection);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ void UTS_OtherLights(LightLoopContext lightLoopContext, FragInputs input, UTSLig
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
float3 lightDirection = utsLightData.lightDirection;
|
float3 lightDirection = utsLightData.lightDirection;
|
||||||
float3 additionalLightColor = utsLightData.lightColor * _Light_Intensity_Multiplier;
|
float3 additionalLightColor = utsLightData.lightColor * _LightIntensityMultiplier;
|
||||||
|
|
||||||
PreLightData preLightData = GetPreLightData(V, posInput, bsdfData);
|
PreLightData preLightData = GetPreLightData(V, posInput, bsdfData);
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ void UTS_OtherLights(LightLoopContext lightLoopContext, FragInputs input, UTSLig
|
|||||||
}
|
}
|
||||||
|
|
||||||
float pureIntensity = max(0.001, (0.299 * additionalLightColor.r + 0.587 * additionalLightColor.g + 0.114 * additionalLightColor.b));
|
float pureIntensity = max(0.001, (0.299 * additionalLightColor.r + 0.587 * additionalLightColor.g + 0.114 * additionalLightColor.b));
|
||||||
float3 lightColor = max(float3(0.0, 0.0, 0.0), lerp(addPassLightColor, lerp(float3(0.0, 0.0, 0.0), min(addPassLightColor, addPassLightColor / pureIntensity), notDirectional), _Is_Filter_LightColor));
|
float3 lightColor = max(float3(0.0, 0.0, 0.0), lerp(addPassLightColor, lerp(float3(0.0, 0.0, 0.0), min(addPassLightColor, addPassLightColor / pureIntensity), notDirectional), _ClampLightColor));
|
||||||
float3 halfDirection = normalize(viewDirection + lightDirection); // has to be recalced here.
|
float3 halfDirection = normalize(viewDirection + lightDirection); // has to be recalced here.
|
||||||
//v.2.0.5:
|
//v.2.0.5:
|
||||||
_1st_ShadeColor_Step = saturate(_1st_ShadeColor_Step + _StepOffset);
|
_1st_ShadeColor_Step = saturate(_1st_ShadeColor_Step + _StepOffset);
|
||||||
|
|||||||
@@ -34,8 +34,9 @@ float GetColorAttenuation(float3 lightColor)
|
|||||||
|
|
||||||
float3 GetLimitedLightColor(float3 lightColor)
|
float3 GetLimitedLightColor(float3 lightColor)
|
||||||
{
|
{
|
||||||
lightColor = ApplyCurrentExposureMultiplier(lightColor);
|
// In a hemisphere, The engery of full radiance is L * 2pi, and the engery of lambert is L * pi. We multiply by 0.5 here to apply the energy conservation.
|
||||||
float3 result = lerp(lightColor, saturate(lightColor), _Is_Filter_LightColor);
|
lightColor = ApplyCurrentExposureMultiplier(lightColor) * 0.5;
|
||||||
|
float3 result = lerp(lightColor, normalize(lightColor), _ClampLightColor);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -57,7 +58,7 @@ DirectLighting UtsEvaluateBSDF_Directional(LightLoopContext lightLoopContext, Po
|
|||||||
// TODO: Colored shadow will overwrite the first and second shading diffuse color
|
// TODO: Colored shadow will overwrite the first and second shading diffuse color
|
||||||
//float3 shadowColor = ComputeShadowColor(shadow, lightData.shadowTint, lightData.penumbraTint);
|
//float3 shadowColor = ComputeShadowColor(shadow, lightData.shadowTint, lightData.penumbraTint);
|
||||||
float4 lightColor = EvaluateLight_Directional(lightLoopContext, posInput, lightData);
|
float4 lightColor = EvaluateLight_Directional(lightLoopContext, posInput, lightData);
|
||||||
lightColor.rgb = GetLimitedLightColor(lightColor.rgb * lightColor.a * _Light_Intensity_Multiplier);
|
lightColor.rgb = GetLimitedLightColor(lightColor.rgb * lightColor.a * _LightIntensityMultiplier);
|
||||||
|
|
||||||
UtsClampRoughness(preLightData, bsdfData, lightData.minRoughness);
|
UtsClampRoughness(preLightData, bsdfData, lightData.minRoughness);
|
||||||
|
|
||||||
@@ -86,7 +87,7 @@ DirectLighting UtsEvaluateBSDF_Punctual(LightLoopContext lightLoopContext, Posit
|
|||||||
// TODO: Colored shadow will overwrite the first and second shading diffuse color
|
// TODO: Colored shadow will overwrite the first and second shading diffuse color
|
||||||
//float3 shadowColor = ComputeShadowColor(shadow, lightData.shadowTint, lightData.penumbraTint);
|
//float3 shadowColor = ComputeShadowColor(shadow, lightData.shadowTint, lightData.penumbraTint);
|
||||||
float4 lightColor = EvaluateLight_Punctual(lightLoopContext, posInput, lightData, L, distances);
|
float4 lightColor = EvaluateLight_Punctual(lightLoopContext, posInput, lightData, L, distances);
|
||||||
lightColor.rgb = GetLimitedLightColor(lightColor.rgb * lightColor.a * _Light_Intensity_Multiplier);
|
lightColor.rgb = GetLimitedLightColor(lightColor.rgb * lightColor.a * _LightIntensityMultiplier);
|
||||||
|
|
||||||
UtsClampRoughness(preLightData, bsdfData, lightData.minRoughness);
|
UtsClampRoughness(preLightData, bsdfData, lightData.minRoughness);
|
||||||
|
|
||||||
|
|||||||
@@ -87,8 +87,7 @@ void UtsLightLoop(FragInputs fragInputs, PositionInputs posInput, UtsBSDFData bs
|
|||||||
float3 L = -light.forward;
|
float3 L = -light.forward;
|
||||||
|
|
||||||
// Is it worth sampling the shadow map?
|
// Is it worth sampling the shadow map?
|
||||||
if ((light.lightDimmer > 0) && (light.shadowDimmer > 0) && // Note: Volumetric can have different dimmer, thus why we test it here
|
if ((light.lightDimmer > 0) && (light.shadowDimmer > 0))
|
||||||
dot(bsdfData.normalWS, L) > 0.0)
|
|
||||||
{
|
{
|
||||||
context.shadowValue = GetDirectionalShadowAttenuation(context.shadowContext,
|
context.shadowValue = GetDirectionalShadowAttenuation(context.shadowContext,
|
||||||
posInput.positionSS, posInput.positionWS + L * _ShadowDistanceBias, UtsGetShadowNormal(bsdfData),
|
posInput.positionSS, posInput.positionWS + L * _ShadowDistanceBias, UtsGetShadowNormal(bsdfData),
|
||||||
|
|||||||
@@ -54,11 +54,10 @@ float3 ComputeSpecularTerm(UtsBSDFData bsdfData, PreLightData preLightData, floa
|
|||||||
|
|
||||||
#elif _PBR_MODE_HAIR
|
#elif _PBR_MODE_HAIR
|
||||||
float3 t = ShiftTangent(bsdfData.bitangentWS, N, bsdfData.anisotropy);
|
float3 t = ShiftTangent(bsdfData.bitangentWS, N, bsdfData.anisotropy);
|
||||||
float specularExponent = RoughnessToBlinnPhongSpecularExponent(PerceptualRoughnessToRoughness(bsdfData.coatRoughness));
|
float specularExponent = RoughnessToBlinnPhongSpecularExponent(PerceptualRoughnessToRoughness(bsdfData.perceptualRoughness));
|
||||||
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));
|
||||||
@@ -69,9 +68,7 @@ float3 ComputeSpecularTerm(UtsBSDFData bsdfData, PreLightData preLightData, floa
|
|||||||
//return specTerm * ColorSpaceDielectricSpec.rgb * clampedNdotL;
|
//return specTerm * ColorSpaceDielectricSpec.rgb * clampedNdotL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
specTerm = DV * preLightData.specularFGD;
|
specTerm = DV * preLightData.specularFGD * clampedNdotL;
|
||||||
specTerm = specTerm * clampedNdotL;
|
|
||||||
|
|
||||||
return specTerm;
|
return specTerm;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -123,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;
|
||||||
@@ -157,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;
|
||||||
|
|||||||
@@ -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];
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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 _LightIntensityMultiplier;
|
||||||
|
|
||||||
float _ShadeColor_Step;
|
// Light Loop
|
||||||
float _1st2nd_Shades_Feather;
|
float3 _ObjectCenterPositionWS;
|
||||||
float4 _Set_2nd_ShadePosition_ST;
|
|
||||||
float4 _ShadingGradeMap_ST;
|
|
||||||
|
|
||||||
float _Tweak_ShadingGradeMapLevel;
|
|
||||||
fixed _BlurLevelSGM;
|
|
||||||
//
|
|
||||||
|
|
||||||
float4 _HighColor;
|
// NOTE: Not sure what these are for
|
||||||
float4 _HighColor_Tex_ST;
|
// float _FirstShadeOverridden;
|
||||||
fixed _Is_LightColor_HighColor;
|
// float _SecondShadeOverridden;
|
||||||
|
|
||||||
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 _Is_Filter_LightColor;
|
|
||||||
|
|
||||||
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;
|
float _ComposerMaskMode;
|
||||||
int _ClippingMatteMode;
|
|
||||||
|
|
||||||
float _GI_Intensity;
|
|
||||||
float _Light_Intensity_Multiplier;
|
|
||||||
|
|
||||||
|
|
||||||
float4 _AngelRingColor;
|
|
||||||
float4 _AngelRingColorMap_ST;
|
|
||||||
float _AngelRingIntensity;
|
|
||||||
float _AngelRingOffsetU;
|
|
||||||
float _AngelRingOffsetV;
|
|
||||||
|
|
||||||
#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;
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user