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

ToonShader did not receive flat and gradient Ambient #395

Open
Thaina opened this issue Feb 23, 2025 · 4 comments · Fixed by #396
Open

ToonShader did not receive flat and gradient Ambient #395

Thaina opened this issue Feb 23, 2025 · 4 comments · Fixed by #396

Comments

@Thaina
Copy link

Thaina commented Feb 23, 2025

Describe the bug
ToonShader did not receive flat and gradient Ambient

I don't see toonshader use any unity_AmbientEquator unity_AmbientGround unity_AmbientSky to set light source color

To Reproduce
Steps to reproduce the behavior:

  1. Using any model with ToonShader
  2. Click on Window > Rendering > Lighting > Environment
  3. Change Environment Lighting source to Gradient and tweak any color
  4. Other model with UniversalShader/Lit change color from ambient but toonshader would not

Expected behavior
toonshader would colored from all ambient gradient as well as other lit shader

Screenshots

Normal
Image

Current
Image

Expect
Image

Desktop (please complete the following information):

  • Windows
  • Chrome

Additional context
Also I don't understand how unity's own Lit shader can get AmbientMode. I would like to fix it myself and made pull request but this AmbientMode have me confused

@sindharta-tanuwijaya
Copy link

Hello.
Thank you very much for your feedback and even a PR to fix this issue !

Just in case, would it be possible for you to share this test project that you are using ?

In the meantime, I'd like to let you know that due to the company reset last year, we at Unity have had to deprioritize the development of the ToonShader package at the moment.
Consequently, we have very limited resources at the moment to address existing bugs, although the above info that you provide will be beneficial for discussions with the community.

That being said, this could change in the near future, though I can’t provide any guarantees at this time.

We appreciate your understanding and support.

@Thaina
Copy link
Author

Thaina commented Feb 26, 2025

For test project, I think you could use the test scene in this repo directly

ToonShader scene would be easiest one I think

Setting the material's Light Probe Intensity to 0.5-1 and change Environment lighting source to Color or Gradient to test

Image

@Thaina
Copy link
Author

Thaina commented Feb 27, 2025

@sindharta-tanuwijaya To be honest I am not really sure if my fix was the right formula. It just seem alright but maybe it should not related to env / intensity and GI, or it is?

@sindharta-tanuwijaya
Copy link

Thank you for sharing your honest opinion! :)
I just wanted to run the CI tests first to identify any errors that might come up.

And yes, before merging the fix into the main branch, we'll make sure to thoroughly validate it.

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

Successfully merging a pull request may close this issue.

2 participants