Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
seoyeon01 opened this issue Jan 16, 2021 · 13 comments
Closed

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

seoyeon01 opened this issue Jan 16, 2021 · 13 comments

Comments

@seoyeon01
Copy link

seoyeon01 commented Jan 16, 2021

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
Copy link

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
Copy link

Fzcpp commented Jan 20, 2021

thx~

@seoyeon01
Copy link
Author

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
Copy link

Thanks, It fixed the issue.

@H3idi-X
Copy link
Contributor

H3idi-X commented Feb 15, 2021

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
Copy link
Contributor

H3idi-X commented Feb 22, 2021

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
Copy link
Author

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
Copy link
Contributor

H3idi-X commented Feb 23, 2021

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

@H3idi-X
Copy link
Contributor

H3idi-X commented Feb 24, 2021

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

@H3idi-X
Copy link
Contributor

H3idi-X commented Mar 8, 2021

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
Copy link

Slaghton commented Apr 3, 2021

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

@H3idi-X
Copy link
Contributor

H3idi-X commented Apr 5, 2021

It does. the points are

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

image

@H3idi-X
Copy link
Contributor

H3idi-X commented Apr 5, 2021

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.

@H3idi-X H3idi-X closed this as completed Apr 5, 2021
yuki4080 pushed a commit to yuki4080/com.unity.toonshader that referenced this issue Dec 22, 2022
* Struggling...

* Test _DirectionalShadowIndex can be  always mainLight?

* We cant use _DirectionalShadowIndex as mainLightIndex. [skip ci]

* added init code _WRITE_TRANPARAENT_MOTION_VECTOR [skip ci]

* Fixed an error on 2019.4.xx [skip ci]

* Updated ToonShader_CelLook.unity to use box light on the figure's face. [skip ci]

* Set up the dx raytrace shadow scene [skip ci]

* Testing box light. [skip ci]

* Implementing box light shading, not shadows yet. [skip ci]

* UTS is ready for box shadow as main lights.

* Updated CHANGELOG.md. [skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants