unity3d-jp / UnityChanToonShaderVer2_Project

UnityChanToonShaderVer2 Project / v.2.0.9 Release
3.82k stars 811 forks source link

Use UTS2 In Unity 2020 (URP 7.x ->10.x) #67

Closed seoyeon01 closed 3 years ago

seoyeon01 commented 3 years ago

2.2.0 URP UTS2 will not be compiled in the latest unity (recently identified in 2020.2.1f1).

This seems to be a problem as the URP version changes from 7.x to 10.x. It's been a long time since I haven't heard about update of UTS2, so i share how to use UTS2 in Unity 2020.

This temporarily eliminates errors and allows for verification of operation, but does not guarantee complete normal functionality.

Image below are modifications to the codes available in Unity 2020 (URP 10.x)

  1. UniversalToonBodyDoubleShadeWithFeather.hlsl 2

  2. UniversalToonBody.hlsl 1

  3. UniversalToonBodyShadingGradeMap.hlsl 3

  4. UniversalToon.shader (This is not issue about URP 7.x -> 10.x. anyway.. there is corrected typo in enum syntex) 4


이미지 364

It's a very ignorant method, but i'm able to use UTS2 in the UNITY 2020 versiont anyway.

I hope to hear the news about UTS2 continuously.

PhotonSPK commented 3 years ago

Hello,I noticed that some modificationss location dont match you mentioned

1 is in UniversalToonBodyDoubleShadeWithFeather.hlsl 2 is in UniversalToonBody.hlsl 3 and 4 are in their location

I tried, it does work on my Unity2020.2.1f1c1 with URP10.2.2 thanks alot

Fzcpp commented 3 years ago

thx~

seoyeon01 commented 3 years ago

Hello,I noticed that some modificationss location dont match you mentioned

1 is in UniversalToonBodyDoubleShadeWithFeather.hlsl 2 is in UniversalToonBody.hlsl 3 and 4 are in their location

I tried, it does work on my Unity2020.2.1f1c1 with URP10.2.2 thanks alot

I modified the part where I wrote the wrong file name. I'm glad to hear that it works properly.

MuzaibRanjha commented 3 years ago

Thanks, It fixed the issue.

H3idi-X commented 3 years ago

Thank you for reporting and providing tips to make UTS work on Universal RP 10.x. Apology that UTS2 not working properly on URP 10.x and this late reply. We are looking into this now and hopefully release new version with URP 10.x compatibility.

H3idi-X commented 3 years ago

Hi, there.

We released 2.2.2 today. Will you please try this?

https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/releases/tag/urp-2.2.2

seoyeon01 commented 3 years ago

Hi, there.

We released 2.2.2 today. Will you please try this?

https://github.com/unity3d-jp/UnityChanToonShaderVer2_Project/releases/tag/urp-2.2.2

The problem occurs in the same way as the reproduction method mentioned in the previous mail. The problem that occurred when changing the shader of the hat is solved. However, if you change the shader of another object in the same way, an error occurs.

Shader error in `Universal Render Pipeline/Toon' : invalid subscript 'vertexSH' at Assets/UTS2/Runtime/Shaders/UniversalToonBodyDoubleShadeWithFeather.hlsl(41) (on d3d11)

I'm attaching a related photo.

Thank you.
image

H3idi-X commented 3 years ago

Thanks and sorry for reporting again. I'll look into the problem.

H3idi-X commented 3 years ago

I found this is related to LIGHT_MAP and not only 10.x, it occurs in former version too.

H3idi-X commented 3 years ago

Hi, we found that fixing this issue is hard without making drastic restructuring. If we fixed this vertxSH error, the next problem is texture number limitation and we will sometime come to see an error, maximum ps_4_0 sampler register index (16) exceeded. 

We had been spending long time to deal with this problem and we have decided to make new shader drastically improved, which, we believe, can get over this issue. Will you please refrain from using light map, checking static in the inspector to UTS objects, for a certain period?

We started the new project a few weeks ago. Currently, we are mainly working on the legacy shader integration similar to Universal and HDRP. Next, we focus on HDRP improvement. Reducing the number of textures will be the next.

Thank you. UTS team.

Slaghton commented 3 years ago

This shader doesn't accept shadows from other objects correct?

H3idi-X commented 3 years ago

It does. the points are

  1. Setting the 1st shade map color.
  2. Enabling Receive System Shadow.

image

H3idi-X commented 3 years ago

As this is opened for other issues, will you open other issues if you are not able to solve what you've asked?

Thanks, UTS Team.