Skip to content

Commit

Permalink
Added support for SRP 12.x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lilxyzw committed Sep 6, 2022
1 parent 7ccb71a commit adb21d0
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Assets/lilToon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.5] - 2022-09-xx
## [1.3.5] - 2022-09-06
### Added
- LightMode override
- `Tiling & Offset` and `Blend Mode (Add / Subtract)` for alpha mask
Expand Down
2 changes: 1 addition & 1 deletion Assets/lilToon/CHANGELOG_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.5] - 2022-09-xx
## [1.3.5] - 2022-09-06
### 追加
- LightModeのオーバーライドを追加
- アルファマスクに`Tiling & Offset``合成モード (加算 / 減算)`を追加
Expand Down
4 changes: 2 additions & 2 deletions Assets/lilToon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This shader is developed for services using avatars (VRChat, etc.) and has the f

# Support
Supported Unity versions
- Unity 2018 - Unity 2022.1
- Unity 2018 - Unity 2022.2

Tested version
- Unity 2018.1.0f2 (Built-in RP)
Expand All @@ -21,7 +21,7 @@ Tested version
- Unity 2019.4.31f1 (Built-in RP / URP 7.7.1 / HDRP 7.7.1)
- Unity 2020.3.36f1 (Built-in RP / URP 10.9.0 / HDRP 10.9.0)
- Unity 2021.3.5f1 (Built-in RP / URP 12.1.7 / HDRP 12.1.7)
- Unity 2022.1.6f1 (Built-in RP / URP 13.1.8 / HDRP 13.1.8)
- Unity 2022.2.0b1 (Built-in RP / URP 14.0.3 / HDRP 14.0.3)

Supported Shader Models
- Normal: SM4.0 / ES3.0 or later
Expand Down
2 changes: 1 addition & 1 deletion Assets/lilToon/README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Unityバージョン
- Unity 2019.4.31f1 (Built-in RP / URP 7.7.1 / HDRP 7.7.1)
- Unity 2020.3.36f1 (Built-in RP / URP 10.9.0 / HDRP 10.9.0)
- Unity 2021.3.5f1 (Built-in RP / URP 12.1.7 / HDRP 12.1.7)
- Unity 2022.1.6f1 (Built-in RP / URP 13.1.8 / HDRP 13.1.8)
- Unity 2022.2.0b1 (Built-in RP / URP 14.0.3 / HDRP 14.0.3)

シェーダーモデル
- 通常版: SM4.0・ES3.0以降
Expand Down
9 changes: 9 additions & 0 deletions Assets/lilToon/Shader/Includes/lil_common_macro.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,15 @@ float3 lilGetObjectPosition()
lightLoopContext.shadowValue = 1;
lightLoopContext.sampleReflection = 0;
lightLoopContext.contactShadow = 0;
#if LIL_SRP_VERSION_GREATER_EQUAL(6, 7)
real contactShadowFade;
#endif
#if LIL_SRP_VERSION_GREATER_EQUAL(12, 1)
real splineVisibility;
#endif
#if defined(APPLY_FOG_ON_SKY_REFLECTIONS)
lightLoopContext.positionWS = 0;
#endif
return lightLoopContext;
}

Expand Down
2 changes: 2 additions & 0 deletions Assets/lilToon/Shader/Includes/lil_pipeline_hdrp.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#define PUNCTUAL_SHADOW_HIGH
#define DIRECTIONAL_SHADOW_HIGH
#endif
//#pragma multi_compile_fragment AREA_SHADOW_MEDIUM AREA_SHADOW_HIGH
#define AREA_SHADOW_MEDIUM

#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPass.cs.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
Expand Down

0 comments on commit adb21d0

Please sign in to comment.