Skip to content

Commit

Permalink
Added documentation an disabled ftpl. (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
H3idi-X authored Sep 20, 2021
1 parent e398d6b commit ae98709
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions com.unity.toonshader/Documentation~/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

<span style="font-size: 150%; color: red; ">【NEW】</span> [<span style="font-size: 150% ">HDRP Scene/Model Toon EV Adjustment</span>](#ToonEvAdjustmentCurve)

<span style="font-size: 150%; color: red; ">【NEW】</span> [<span style="font-size: 150% ">HDRP Raytrace Shadow</span>](#RaytraceShadow)

[![](images/SDUnitychan_URP.png)](https://www.youtube.com/watch?v=TfZ8B409uqM)
[![](images/CRS_VFXJ.png)](https://www.youtube.com/watch?v=p4azFua4rJo)
<img width = "800" src="images/TPK_04.png">
Expand Down Expand Up @@ -1063,3 +1065,10 @@ Or, you can apply this feature to a certain model by chosing `GameObject/Toon Sh
| `Ignore Volume Exposure` | Ignore the automatic corrections built into HDRP. If this checkbox is On, lights brighter than 1 will result in more blown whites and a much more exaggerated Bloom. However, this method is suitable if you are using Light Culling or similar to shine independent lights of 1lux or less on your character.|
| `Light High Cut Filter` | Clips up to 1 lux of light hitting objects with Toon Shader materials.|
| `Toon EV adjustment curve` | The correction is done with an editable curve; since it would be impossible for an artist to draw a curve that controls from 0 lux to 130000 lux, EV is used as the brightness unit in this screen. By default, the curve is set to linearly complement the range from -10 EV to -1.32 EV.|
---
<a id="RaytraceShadow"></a>
## 15. <span style="color: red; ">【NEW】</span> Raytrace Shadow
<img width = "800" src="images/ShadowmapVariation.gif">

Raytrace Shadow of HDRP is now supported in Unity Toon Shader. This feature is only available for HDRP and only when the DirectX 12 API is selected.
For more information on how to set up Raytrace Shadow, please click [here](https://docs.unity3d.com/Packages/[email protected]/manual/Ray-Traced-Shadows.html).
8 changes: 8 additions & 0 deletions com.unity.toonshader/Documentation~/ja/index_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

<span style="font-size: 150%; color: red; ">【NEW】</span> [<span style="font-size: 150% ">HDRP Scene/Model Toon EV Adjustment</span>](#ToonEvAdjustmentCurve)

<span style="font-size: 150%; color: red; ">【NEW】</span> [<span style="font-size: 150% ">HDRP Raytrace Shadow</span>](#RaytraceShadow)

[![](../images/SDUnitychan_URP.png)](https://www.youtube.com/watch?v=TfZ8B409uqM)
[![](../images/CRS_VFXJ.png)](https://www.youtube.com/watch?v=p4azFua4rJo)
<img width = "800" src="../images/TPK_04.png">
Expand Down Expand Up @@ -1037,3 +1039,9 @@ Unity Toon Shader では、Phong Tessellation にのみ対応しています。
| `Light High Cut Filter` | Toon Shader マテリアルを持つオブジェクトに当たるライトを 1 lux までにクリップします。|
| `Toon EV adjustment curve` | 編集可能なカーブで補正を行います。0 lux から 130000 luxまでをコントロールするカーブをアーティストが描くのは無理があるため、この画面では EV を明るさの単位として用いています。デフォルトでは -10 EVから -1.32 EV までをリニアに補完するカーブが設定されています。|
---
<a id="RaytraceShadow"></a>
## 15. <span style="color: red; ">【NEW】</span> Raytrace Shadow
<img width = "800" src="../images/ShadowmapVariation.gif">

Unity Toon Shader は HDRP の Raytrace Shadow に対応しました。本機能はHDRP専用でDirectX 12 API を選択した場合にのみ利用可能です。
Raytrace Shadowの設定方法は[こちら](https://docs.unity3d.com/Packages/[email protected]/manual/Ray-Traced-Shadows.html)をご確認ください。
8 changes: 2 additions & 6 deletions com.unity.toonshader/Runtime/HDRP/Shaders/HDRPToon.shader
Original file line number Diff line number Diff line change
Expand Up @@ -959,12 +959,8 @@ Shader "HDRP/Toon"
#pragma multi_compile SCREEN_SPACE_SHADOWS_OFF SCREEN_SPACE_SHADOWS_ON
// Supported shadow modes per light type
#pragma multi_compile SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH

#if defined (SHADER_API_D3D12)
#define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
#else
#pragma multi_compile USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST
#endif
#define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
//#pragma multi_compile USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST
#define SHADERPASS SHADERPASS_FORWARD
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -983,11 +983,9 @@ Shader "HDRP/ToonTessellation"
#pragma multi_compile SCREEN_SPACE_SHADOWS_OFF SCREEN_SPACE_SHADOWS_ON
// Supported shadow modes per light type
#pragma multi_compile SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH
#if defined (SHADER_API_D3D12)
#define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
#else
#pragma multi_compile USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST
#endif
#define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
//#pragma multi_compile USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST

#define SHADERPASS SHADERPASS_FORWARD
// In case of opaque we don't want to perform the alpha test, it is done in depth prepass and we use depth equal for ztest (setup from UI)
// Don't do it with debug display mode as it is possible there is no depth prepass in this case
Expand Down

0 comments on commit ae98709

Please sign in to comment.