Skip to content

Commit

Permalink
Task/1134 point light hi cut filter (unity3d-jp#122)
Browse files Browse the repository at this point in the history
* Added a Scene ToonShader_PrulalPointLights [skip ci]

* Improved Legacy Point Light Hi cut filter.

* * Fixed: Point Light High Cut Filter side effects.
* renamed above to Point Light High Light Filter.
* renamed Stencil No. to Stencil Number.
* Replaced Some `RimLight` to `Rim Light`.
  • Loading branch information
H3idi-X authored Mar 10, 2022
1 parent 0445615 commit a5d23f0
Show file tree
Hide file tree
Showing 13 changed files with 2,070 additions and 26 deletions.
1,946 changes: 1,946 additions & 0 deletions Toonshader_ProjectLegacy/Assets/Scenes/ToonShader_PluralPointLights.unity

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: CellTouch_ToonShader_Face_Firefly
m_Shader: {fileID: 4800000, guid: 9baf30ce95c751649b14d96da3a4b4d5, type: 3}
m_ShaderKeywords: _EMISSIVE_SIMPLE _OUTLINE_NML
m_ShaderKeywords: _EMISSIVE_SIMPLE _IS_ANGELRING_OFF _IS_CLIPPING_OFF _IS_OUTLINE_CLIPPING_NO
_OUTLINE_NML
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
stringTagMap:
IgnoreProjection: False
RenderType: Opaque
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
Expand All @@ -27,6 +30,10 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _AngelRing_Sampler:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BakedNormal:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand All @@ -35,6 +42,10 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ClippingMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Emissive_Tex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand Down Expand Up @@ -87,44 +98,60 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ShadingGradeMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _1st2nd_Shades_Feather: 0.0001
- _1st_ShadeColor_Feather: 0.0001
- _1st_ShadeColor_Step: 0.631
- _1st_ShadeColor_Step: 0.5
- _2nd_ShadeColor_Feather: 0.0001
- _2nd_ShadeColor_Step: 0
- _ARSampler_AlphaOn: 0
- _AR_OffsetU: 0
- _AR_OffsetV: 0.3
- _Add_Antipodean_RimLight: 0
- _AngelRing: 0
- _Ap_RimLight_FeatherOff: 0
- _Ap_RimLight_Power: 0.1
- _BaseColor_Step: 0.631
- _AutoRenderQueue: 1
- _BaseColor_Step: 0.5
- _BaseShade_Feather: 0.0001
- _Base_Speed: 0
- _BlurLevelMatcap: 0
- _BlurLevelSGM: 0
- _BumpScale: 1
- _BumpScaleMatcap: 1
- _CameraRolling_Stabilizer: 0
- _ClippingMode: 0
- _Clipping_Level: 0
- _ColorShift_Speed: 0
- _CullMode: 2
- _EMISSIVE: 0
- _Farthest_Distance: 10
- _GI_Intensity: 0
- _HighColor_Power: 0
- _Inverse_Clipping: 0
- _Inverse_MatcapMask: 0
- _Inverse_Z_Axis_BLD: 0
- _IsBaseMapAlphaAsClippingMask: 0
- _Is_BLD: 0
- _Is_BakedNormal: 0
- _Is_BlendAddToHiColor: 1
- _Is_BlendAddToMatCap: 1
- _Is_BlendBaseColor: 0
- _Is_ColorShift: 0
- _Is_Filter_HiCutPointLightColor: 0
- _Is_Filter_HiCutPointLightColor: 1
- _Is_Filter_LightColor: 0
- _Is_LightColor_1st_Shade: 1
- _Is_LightColor_2nd_Shade: 1
- _Is_LightColor_AR: 1
- _Is_LightColor_Ap_RimLight: 1
- _Is_LightColor_Base: 1
- _Is_LightColor_HighColor: 1
- _Is_LightColor_MatCap: 1
- _Is_LightColor_Outline: 1
- _Is_LightColor_RimLight: 1
- _Is_NormalMapForMatCap: 0
- _Is_NormalMapToBase: 0
Expand Down Expand Up @@ -153,28 +180,45 @@ Material:
- _Rotate_EmissiveUV: 0
- _Rotate_MatCapUV: 0
- _Rotate_NormalMapForMatCapUV: 0
- _SPRDefaultUnlitColorMask: 15
- _SRPDefaultUnlitColMode: 1
- _Scroll_EmissiveU: 0
- _Scroll_EmissiveV: 0
- _Set_SystemShadowsToBase: 1
- _ShadeColor_Step: 0
- _StepOffset: 0.207
- _StencilComp: 0
- _StencilMode: 0
- _StencilNo: 1
- _StencilOpFail: 0
- _StencilOpPass: 0
- _StepOffset: -0.5
- _TransparentEnabled: 0
- _TweakHighColorOnShadow: 0
- _TweakMatCapOnShadow: 0
- _Tweak_HighColorMaskLevel: 0
- _Tweak_LightDirection_MaskLevel: 0
- _Tweak_MatCapUV: 0
- _Tweak_MatcapMaskLevel: 0
- _Tweak_RimLightMaskLevel: 0
- _Tweak_ShadingGradeMapLevel: 0
- _Tweak_SystemShadowsLevel: 0
- _Tweak_transparency: 0
- _Unlit_Intensity: 1
- _Use_1stAs2nd: 1
- _Use_BaseAs1st: 0
- _ZOverDrawMode: 0
- _ZWriteMode: 1
- _isUnityToonshader: 1
- _simpleUI: 0
- _utsTechnique: 0
- _utsVersion: 2.075
- _utsVersionX: 0
- _utsVersionY: 7
- _utsVersionZ: 0
m_Colors:
- _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1}
- _2nd_ShadeColor: {r: 1, g: 1, b: 1, a: 1}
- _AngelRing_Color: {r: 1, g: 1, b: 1, a: 1}
- _Ap_RimLightColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _AngelRing_Sampler:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BakedNormal:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand All @@ -35,6 +39,10 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ClippingMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Emissive_Tex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
Expand Down Expand Up @@ -87,30 +95,44 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ShadingGradeMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _1st2nd_Shades_Feather: 0.0001
- _1st_ShadeColor_Feather: 0.0001
- _1st_ShadeColor_Step: 0.703
- _2nd_ShadeColor_Feather: 0.0001
- _2nd_ShadeColor_Step: 0
- _ARSampler_AlphaOn: 0
- _AR_OffsetU: 0
- _AR_OffsetV: 0.3
- _Add_Antipodean_RimLight: 0
- _AngelRing: 0
- _Ap_RimLight_FeatherOff: 0
- _Ap_RimLight_Power: 0.1
- _AutoRenderQueue: 1
- _BaseColor_Step: 0.703
- _BaseShade_Feather: 0.0001
- _Base_Speed: 0
- _BlurLevelMatcap: 0
- _BlurLevelSGM: 0
- _BumpScale: 1
- _BumpScaleMatcap: 1
- _CameraRolling_Stabilizer: 0
- _ClippingMode: 0
- _Clipping_Level: 0
- _ColorShift_Speed: 0
- _CullMode: 2
- _EMISSIVE: 0
- _Farthest_Distance: 10
- _GI_Intensity: 0
- _HighColor_Power: 0
- _Inverse_Clipping: 0
- _Inverse_MatcapMask: 0
- _Inverse_Z_Axis_BLD: 0
- _IsBaseMapAlphaAsClippingMask: 0
- _Is_BLD: 0
- _Is_BakedNormal: 0
- _Is_BlendAddToHiColor: 1
Expand All @@ -121,10 +143,12 @@ Material:
- _Is_Filter_LightColor: 0
- _Is_LightColor_1st_Shade: 1
- _Is_LightColor_2nd_Shade: 1
- _Is_LightColor_AR: 1
- _Is_LightColor_Ap_RimLight: 1
- _Is_LightColor_Base: 1
- _Is_LightColor_HighColor: 1
- _Is_LightColor_MatCap: 1
- _Is_LightColor_Outline: 1
- _Is_LightColor_RimLight: 1
- _Is_NormalMapForMatCap: 0
- _Is_NormalMapToBase: 0
Expand Down Expand Up @@ -153,28 +177,48 @@ Material:
- _Rotate_EmissiveUV: 0
- _Rotate_MatCapUV: 0
- _Rotate_NormalMapForMatCapUV: 0
- _SPRDefaultUnlitColorMask: 15
- _SRPDefaultUnlitColMode: 1
- _Scroll_EmissiveU: 0
- _Scroll_EmissiveV: 0
- _Set_SystemShadowsToBase: 1
- _ShadeColor_Step: 0
- _StencilComp: 8
- _StencilMode: 0
- _StencilNo: 1
- _StencilOpFail: 0
- _StencilOpPass: 0
- _StepOffset: 0.106
- _TessEdgeLength: 5
- _TessExtrusionAmount: 0
- _TessPhongStrength: 0.5
- _TransparentEnabled: 0
- _TweakHighColorOnShadow: 0
- _TweakMatCapOnShadow: 0
- _Tweak_HighColorMaskLevel: 0
- _Tweak_LightDirection_MaskLevel: 0
- _Tweak_MatCapUV: 0
- _Tweak_MatcapMaskLevel: 0
- _Tweak_RimLightMaskLevel: 0
- _Tweak_ShadingGradeMapLevel: 0
- _Tweak_SystemShadowsLevel: 0.05
- _Tweak_transparency: 0
- _Unlit_Intensity: 1
- _Use_1stAs2nd: 1
- _Use_BaseAs1st: 0
- _ZOverDrawMode: 0
- _ZWriteMode: 1
- _isUnityToonshader: 1
- _simpleUI: 0
- _utsTechnique: 0
- _utsVersion: 2.075
- _utsVersionX: 0
- _utsVersionY: 7
- _utsVersionZ: 0
m_Colors:
- _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1}
- _2nd_ShadeColor: {r: 0.85294116, g: 0.82158303, b: 0.82158303, a: 1}
- _AngelRing_Color: {r: 1, g: 1, b: 1, a: 1}
- _Ap_RimLightColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Floats:
- _1st2nd_Shades_Feather: 0.0001
- _1st_ShadeColor_Feather: 0.08
- _1st_ShadeColor_Step: 0.507
- _1st_ShadeColor_Feather: 0.074
- _1st_ShadeColor_Step: 0.5
- _2nd_ShadeColor_Feather: 0.0001
- _2nd_ShadeColor_Step: 0
- _ARSampler_AlphaOn: 0
Expand All @@ -136,8 +136,8 @@ Material:
- _Ap_RimLight_FeatherOff: 0
- _Ap_RimLight_Power: 0.1
- _AutoRenderQueue: 1
- _BaseColor_Step: 0.507
- _BaseShade_Feather: 0.08
- _BaseColor_Step: 0.5
- _BaseShade_Feather: 0.074
- _Base_Speed: 0
- _BlurLevelMatcap: 0
- _BlurLevelSGM: 0
Expand Down Expand Up @@ -212,7 +212,7 @@ Material:
- _StencilNo: 1
- _StencilOpFail: 0
- _StencilOpPass: 0
- _StepOffset: 0
- _StepOffset: -0.5
- _TransparentEnabled: 0
- _TweakHighColorOnShadow: 0
- _TweakMatCapOnShadow: 0
Expand All @@ -234,8 +234,8 @@ Material:
- _utsTechnique: 0
- _utsVersion: 2.075
- _utsVersionX: 0
- _utsVersionY: 0
- _utsVersionZ: 2
- _utsVersionY: 7
- _utsVersionZ: 0
m_Colors:
- _1st_ShadeColor: {r: 1, g: 1, b: 1, a: 1}
- _2nd_ShadeColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
Expand Down
9 changes: 6 additions & 3 deletions com.unity.toonshader/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
* Shader version properties in all the render pipeline shaders.
* Updated installation.md.
* Replaced toggle buttons Off/Active UI to Unity standard toggle.
* Renamed Basic Shader Settings to Shader Setting.
* Replaced some toggle buttons, such as Emissive UV Coord, Specular Mode, to dropdown menus
* Renamed `Basic Shader Settings` to `Shader Setting`.
* Renamed `Point Light High Cut Filter` to `Point Light Hight Light Filter`.
* Replaced some toggle buttons, such as `Emissive UV Coord`, `Specular Mode`, to dropdown menus
* Made everything in the inspector hidden when disabled to be shown but grayed out.
* Replaced folder header to use Unity standard style in the inspector window.
* Replaced `【DX11 Phong Tessellation Settings】` to `Legacy Pipeline: Phong Tessellation Settings` as it works on Mac.
* Replaced term, `Technique` to `Mode`.
* Replaced term, `Contribution` to `Effectiveness`.
* Replaced term, `High Color` to `High Light`.
* Replaced "Settings for PointLights in ForwardAdd Pass" to "Point Light Settings".
* Replaced `Settings for PointLights in ForwardAdd Pass` to `Point Light Settings`.
* Replaced `Stencil No.` to `Stencil Number`.
* Removed Game Recommendation window and changed the default values of shader variables.* The titles of the items in the Inspector window, which were not always consistent, such as "Setup" and "Settings," are now consistent with "Settings.* Renamed Shader GUI class and mede them integrated before integrate all the render pipeline shaders. All the render pipeline shaders use one Custom Editor class.
* Removed 【】in the Inspector window.
### Added:
Expand All @@ -25,6 +27,7 @@
* Removed Japanese and English manual link buttons.
### Fixed:
* Undo/Redo was not working on some itemes in the inspector window.
* `Point Light High Cut Filter` Side Effects.

## [0.6.1-preview] - 2022-02-24
### Fixed:
Expand Down
8 changes: 4 additions & 4 deletions com.unity.toonshader/Editor/UTS3GUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ private static class Styles
public static GUIContent normalMapText = new GUIContent("Normal Map", "Normal Map : Texture(bump)");
public static GUIContent highColorText = new GUIContent("High Light", "High Light : Texture(sRGB) × Color(RGB) Default:Black");
public static GUIContent highColorMaskText = new GUIContent("High Light Mask", "High Light Mask : Texture(linear)");
public static GUIContent rimLightMaskText = new GUIContent("Rim Light Mask", "RimLight Mask : Texture(linear)");
public static GUIContent rimLightMaskText = new GUIContent("Rim Light Mask", "Rim Light Mask : Texture(linear)");
public static GUIContent matCapSamplerText = new GUIContent("MatCap Sampler", "MatCap Sampler : Texture(sRGB) × Color(RGB) Default:White");
public static GUIContent matCapMaskText = new GUIContent("MatCap Mask", "MatCap Mask : Texture(linear)");
public static GUIContent angelRingText = new GUIContent("Angel Ring", "AngelRing : Texture(sRGB) × Color(RGB) Default:Black");
Expand Down Expand Up @@ -1523,7 +1523,7 @@ void GUI_StencilMode(Material material)


int _Current_StencilNo = _StencilNo_Setting;
_Current_StencilNo = (int)EditorGUILayout.IntField("Stencil No.", _Current_StencilNo);
_Current_StencilNo = (int)EditorGUILayout.IntField("Stencil Number", _Current_StencilNo);
if (_StencilNo_Setting != _Current_StencilNo)
{
material.SetInt(ShaderPropStencilNo, _Current_StencilNo);
Expand Down Expand Up @@ -2033,7 +2033,7 @@ void GUI_AdditionalLookdevs(Material material)
}
EditorGUILayout.EndHorizontal();
#else
GUI_Toggle(material, "Point Light Hi-Cut Filter", ShaderPropIsFilterHiCutPointLightColor, MaterialGetInt(material, ShaderPropIsFilterHiCutPointLightColor) != 0);
GUI_Toggle(material, "Point Light High Light Filter", ShaderPropIsFilterHiCutPointLightColor, MaterialGetInt(material, ShaderPropIsFilterHiCutPointLightColor) != 0);
#endif
EditorGUI.indentLevel--;
EditorGUILayout.Space();
Expand Down Expand Up @@ -2397,7 +2397,7 @@ void GUI_RimLight(Material material)

GUILayout.Label(" RimLight Mask", EditorStyles.boldLabel);
m_MaterialEditor.TexturePropertySingleLine(Styles.rimLightMaskText, set_RimLightMask);
m_MaterialEditor.RangeProperty(tweak_RimLightMaskLevel, "RimLight Mask Level");
m_MaterialEditor.RangeProperty(tweak_RimLightMaskLevel, "Rim Light Mask Level");

//EditorGUI.indentLevel--;

Expand Down
Loading

0 comments on commit a5d23f0

Please sign in to comment.