diff --git a/README.md b/README.md index a6200dd9..fb49528d 100644 --- a/README.md +++ b/README.md @@ -94,4 +94,4 @@ git config --global core.symlinks true -*Auto-generated on Wed Oct 15 14:06:35 UTC 2025* +*Auto-generated on Wed Oct 22 05:43:29 UTC 2025* diff --git a/com.unity.toonshader/Runtime/Integrated/Shaders/UnityToon.shader b/com.unity.toonshader/Runtime/Integrated/Shaders/UnityToon.shader index 4541f19a..8eeb70aa 100644 --- a/com.unity.toonshader/Runtime/Integrated/Shaders/UnityToon.shader +++ b/com.unity.toonshader/Runtime/Integrated/Shaders/UnityToon.shader @@ -258,26 +258,13 @@ Shader "Toon" { _NormalScale("_NormalScale", Range(0.0, 8.0)) = 1 _BentNormalMap("_BentNormalMap", 2D) = "bump" {} - _BentNormalMapOS("_BentNormalMapOS", 2D) = "white" {} _HeightMap("HeightMap", 2D) = "black" {} - // 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. + // Caution: Default value of _HeightAmplitude must stay in sync with authored displacement data. [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 @@ -290,7 +277,6 @@ Shader "Toon" { _AnisotropyMap("AnisotropyMap", 2D) = "white" {} [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" {} @@ -317,25 +303,15 @@ Shader "Toon" { [Enum(Off, 0, From Ambient Occlusion, 1, From Bent Normals, 2)] _SpecularOcclusionMode("Specular Occlusion Mode", Int) = 1 [HDR] _EmissiveColor("EmissiveColor", Color) = (0, 0, 0) - // Used only to serialize the LDR and HDR emissive color in the material UI, - // in the shader only the _EmissiveColor should be used - [HideInInspector] _EmissiveColorLDR("EmissiveColor LDR", Color) = (0, 0, 0) _EmissiveColorMap("EmissiveColorMap", 2D) = "white" {} [ToggleUI] _AlbedoAffectEmissive("Albedo Affect Emissive", Float) = 0.0 - [HideInInspector] _EmissiveIntensityUnit("Emissive Mode", Int) = 0 - [ToggleUI] _UseEmissiveIntensity("Use Emissive Intensity", Int) = 0 - _EmissiveIntensity("Emissive Intensity", Float) = 1 _EmissiveExposureWeight("Emissive Pre Exposure", Range(0.0, 1.0)) = 1.0 _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 @@ -344,25 +320,15 @@ Shader "Toon" { _DistortionBlurRemapMax("DistortionBlurRemapMax", Float) = 1.0 [ToggleUI] _UseShadowThreshold("_UseShadowThreshold", Float) = 0.0 - [ToggleUI] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0 _AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 _AlphaCutoffShadow("_AlphaCutoffShadow", Range(0.0, 1.0)) = 0.5 _AlphaCutoffPrepass("_AlphaCutoffPrepass", Range(0.0, 1.0)) = 0.5 _AlphaCutoffPostpass("_AlphaCutoffPostpass", Range(0.0, 1.0)) = 0.5 - [ToggleUI] _TransparentDepthPrepassEnable("_TransparentDepthPrepassEnable", Float) = 0.0 - [ToggleUI] _TransparentBackfaceEnable("_TransparentBackfaceEnable", Float) = 0.0 - [ToggleUI] _TransparentDepthPostpassEnable("_TransparentDepthPostpassEnable", Float) = 0.0 - _TransparentSortPriority("_TransparentSortPriority", Float) = 0 - // Transparency - [Enum(None, 0, Box, 1, Sphere, 2, Thin, 3)]_RefractionModel("Refraction Model", Int) = 0 - [Enum(Proxy, 1, HiZ, 2)]_SSRefractionProjectionModel("Refraction Projection Model", Int) = 0 _Ior("Index Of Refraction", Range(1.0, 2.5)) = 1.0 - _ThicknessMultiplier("Thickness Multiplier", Float) = 1.0 _TransmittanceColor("Transmittance Color", Color) = (1.0, 1.0, 1.0) _TransmittanceColorMap("TransmittanceColorMap", 2D) = "white" {} _ATDistance("Transmittance Absorption Distance", Float) = 1.0 - [ToggleUI] _TransparentWritingMotionVec("_TransparentWritingMotionVec", Float) = 0.0 // Stencil state @@ -380,11 +346,8 @@ Shader "Toon" { [HideInInspector] _StencilWriteMaskMV("_StencilWriteMaskMV", Int) = 128 // StencilBitMask.ObjectMotionVectors // Distortion vector pass [HideInInspector] _StencilRefDistortionVec("_StencilRefDistortionVec", Int) = 64 // StencilBitMask.DistortionVectors - [HideInInspector] _StencilWriteMaskDistortionVec("_StencilWriteMaskDistortionVec", Int) = 64 // StencilBitMask.DistortionVectors // Blending state - [HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0 - [HideInInspector] _BlendMode("__blendmode", Float) = 0.0 [HideInInspector] _SrcBlend("__src", Float) = 1.0 [HideInInspector] _DstBlend("__dst", Float) = 0.0 [HideInInspector] _AlphaSrcBlend("__alphaSrc", Float) = 1.0 @@ -398,14 +361,9 @@ Shader "Toon" { [HideInInspector] _ZTestGBuffer("_ZTestGBuffer", Int) = 4 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTestTransparent("Transparent ZTest", Int) = 4 // Less equal - [ToggleUI] _EnableFogOnTransparent("Enable Fog", Float) = 1.0 - [ToggleUI] _EnableBlendModePreserveSpecularLighting("Enable Blend Mode Preserve Specular Lighting", Float) = 1.0 - [ToggleUI] _DoubleSidedEnable("Double sided enable", Float) = 0.0 - [Enum(Flip, 0, Mirror, 1, None, 2)] _DoubleSidedNormalMode("Double sided normal mode", Float) = 1 [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 @@ -424,16 +382,12 @@ Shader "Toon" { _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) @@ -446,10 +400,6 @@ Shader "Toon" { // 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("BaseMap", 2D) = "white" {} _Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 - - [ToggleUI] _SupportDecals("Support Decals", Float) = 1.0 - [ToggleUI] _ReceivesSSR("Receives SSR", Float) = 1.0 - [ToggleUI] _AddPrecomputedVelocity("AddPrecomputedVelocity", Float) = 0.0 ////////////////////////////////////////////////////////////////////////////// //////////////////// End of HDRP material default values. //////////////////// ////////////////////////////////////////////////////////////////////////////// diff --git a/com.unity.toonshader/Runtime/Integrated/Shaders/UnityToonTessellation.shader b/com.unity.toonshader/Runtime/Integrated/Shaders/UnityToonTessellation.shader index ebae002f..25ac0e41 100644 --- a/com.unity.toonshader/Runtime/Integrated/Shaders/UnityToonTessellation.shader +++ b/com.unity.toonshader/Runtime/Integrated/Shaders/UnityToonTessellation.shader @@ -1,4 +1,4 @@ -//Unity Toon Shader +//Unity Toon Shader Shader "Toon(Tessellation)" { Properties { @@ -259,26 +259,13 @@ Shader "Toon(Tessellation)" { _NormalScale("_NormalScale", Range(0.0, 8.0)) = 1 _BentNormalMap("_BentNormalMap", 2D) = "bump" {} - _BentNormalMapOS("_BentNormalMapOS", 2D) = "white" {} _HeightMap("HeightMap", 2D) = "black" {} - // 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. + // Caution: Default value of _HeightAmplitude must stay in sync with authored displacement data. [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 @@ -291,7 +278,6 @@ Shader "Toon(Tessellation)" { _AnisotropyMap("AnisotropyMap", 2D) = "white" {} [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" {} @@ -318,25 +304,15 @@ Shader "Toon(Tessellation)" { [Enum(Off, 0, From Ambient Occlusion, 1, From Bent Normals, 2)] _SpecularOcclusionMode("Specular Occlusion Mode", Int) = 1 [HDR] _EmissiveColor("EmissiveColor", Color) = (0, 0, 0) - // Used only to serialize the LDR and HDR emissive color in the material UI, - // in the shader only the _EmissiveColor should be used - [HideInInspector] _EmissiveColorLDR("EmissiveColor LDR", Color) = (0, 0, 0) _EmissiveColorMap("EmissiveColorMap", 2D) = "white" {} [ToggleUI] _AlbedoAffectEmissive("Albedo Affect Emissive", Float) = 0.0 - [HideInInspector] _EmissiveIntensityUnit("Emissive Mode", Int) = 0 - [ToggleUI] _UseEmissiveIntensity("Use Emissive Intensity", Int) = 0 - _EmissiveIntensity("Emissive Intensity", Float) = 1 _EmissiveExposureWeight("Emissive Pre Exposure", Range(0.0, 1.0)) = 1.0 _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 @@ -345,25 +321,15 @@ Shader "Toon(Tessellation)" { _DistortionBlurRemapMax("DistortionBlurRemapMax", Float) = 1.0 [ToggleUI] _UseShadowThreshold("_UseShadowThreshold", Float) = 0.0 - [ToggleUI] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0 _AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 _AlphaCutoffShadow("_AlphaCutoffShadow", Range(0.0, 1.0)) = 0.5 _AlphaCutoffPrepass("_AlphaCutoffPrepass", Range(0.0, 1.0)) = 0.5 _AlphaCutoffPostpass("_AlphaCutoffPostpass", Range(0.0, 1.0)) = 0.5 - [ToggleUI] _TransparentDepthPrepassEnable("_TransparentDepthPrepassEnable", Float) = 0.0 - [ToggleUI] _TransparentBackfaceEnable("_TransparentBackfaceEnable", Float) = 0.0 - [ToggleUI] _TransparentDepthPostpassEnable("_TransparentDepthPostpassEnable", Float) = 0.0 - _TransparentSortPriority("_TransparentSortPriority", Float) = 0 - // Transparency - [Enum(None, 0, Box, 1, Sphere, 2, Thin, 3)]_RefractionModel("Refraction Model", Int) = 0 - [Enum(Proxy, 1, HiZ, 2)]_SSRefractionProjectionModel("Refraction Projection Model", Int) = 0 _Ior("Index Of Refraction", Range(1.0, 2.5)) = 1.0 - _ThicknessMultiplier("Thickness Multiplier", Float) = 1.0 _TransmittanceColor("Transmittance Color", Color) = (1.0, 1.0, 1.0) _TransmittanceColorMap("TransmittanceColorMap", 2D) = "white" {} _ATDistance("Transmittance Absorption Distance", Float) = 1.0 - [ToggleUI] _TransparentWritingMotionVec("_TransparentWritingMotionVec", Float) = 0.0 // Stencil state @@ -381,11 +347,8 @@ Shader "Toon(Tessellation)" { [HideInInspector] _StencilWriteMaskMV("_StencilWriteMaskMV", Int) = 128 // StencilBitMask.ObjectMotionVectors // Distortion vector pass [HideInInspector] _StencilRefDistortionVec("_StencilRefDistortionVec", Int) = 64 // StencilBitMask.DistortionVectors - [HideInInspector] _StencilWriteMaskDistortionVec("_StencilWriteMaskDistortionVec", Int) = 64 // StencilBitMask.DistortionVectors // Blending state - [HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0 - [HideInInspector] _BlendMode("__blendmode", Float) = 0.0 [HideInInspector] _SrcBlend("__src", Float) = 1.0 [HideInInspector] _DstBlend("__dst", Float) = 0.0 [HideInInspector] _AlphaSrcBlend("__alphaSrc", Float) = 1.0 @@ -399,14 +362,9 @@ Shader "Toon(Tessellation)" { [HideInInspector] _ZTestGBuffer("_ZTestGBuffer", Int) = 4 [Enum(UnityEngine.Rendering.CompareFunction)] _ZTestTransparent("Transparent ZTest", Int) = 4 // Less equal - [ToggleUI] _EnableFogOnTransparent("Enable Fog", Float) = 1.0 - [ToggleUI] _EnableBlendModePreserveSpecularLighting("Enable Blend Mode Preserve Specular Lighting", Float) = 1.0 - [ToggleUI] _DoubleSidedEnable("Double sided enable", Float) = 0.0 - [Enum(Flip, 0, Mirror, 1, None, 2)] _DoubleSidedNormalMode("Double sided normal mode", Float) = 1 [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 @@ -425,16 +383,12 @@ Shader "Toon(Tessellation)" { _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) @@ -456,10 +410,6 @@ Shader "Toon(Tessellation)" { // 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("BaseMap", 2D) = "white" {} _Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 - - [ToggleUI] _SupportDecals("Support Decals", Float) = 1.0 - [ToggleUI] _ReceivesSSR("Receives SSR", Float) = 1.0 - [ToggleUI] _AddPrecomputedVelocity("AddPrecomputedVelocity", Float) = 0.0 ////////////////////////////////////////////////////////////////////////////// //////////////////// End of HDRP material default values. //////////////////// //////////////////////////////////////////////////////////////////////////////