Dustyroom / flat-kit-doc

Documentation of the Flat Kit asset.
https://flatkit.dustyroom.com
Apache License 2.0
2 stars 1 forks source link

Shader error in 'FlatKit/Stylized Surface': 'OUTPUT_SH': Too many arguments for a macro call. #106

Closed Lucasjojo closed 1 year ago

Lucasjojo commented 1 year ago

Describe the bug I imported Flat Kit: Toon Shading and Water packeage in my project.But the project reported an error directly.I cant fix this.

Screenshots 1694249161957 1694249207194 1694249239711

Unity details: Flat Kit version 3.9.1 Unity 2023.1.11f1 Dev platform: WindowsEditor Target platform: StandaloneWindows64 URP installed: True, version 15.0.6 Render pipeline: UniversalPipeline Color space: Gamma Quality config: [FlatKit] Example URP Asset Graphics config: [FlatKit] Example URP Asset

dustyroom-studio commented 1 year ago

Hi, please try doing the following:

If this doesn't help:

Hope this helps.

Lucasjojo commented 1 year ago

I have tried the two methods above, but the problem still hasn't been solved. _20230909220220

dustyroom-studio commented 1 year ago

Do you have the project that was made as URP from the start? Or did you upgrade it from Built-in RP? In any case please make sure you have the properly installed URP packages.

I'd recommend to try creating a temporary fresh URP (!) project and importing Flat Kit into it — It should work out of the box.

Lucasjojo commented 1 year ago

I have tried everything you said, but the new URP project still reported that error. Have you tried using the URP rendering pipeline from 2023.1.11f1 to import this resource package?

dustyroom-studio commented 1 year ago

You're right, there is an error when using Flat Kit 3.9.1 and URP 15.0.6. We're releasing an update that will address this today.

To add some context, Unity went back and forth with the signature of OUTPUT_SH within minor versions of URP. They added another parameter, so we adapted Flat Kit to work with that. Then they probably received a lot of backlash because of broken projects and reverted that change, so we reverted ours back as well. It seems that they settled on two different functions now, which we'll use depending on the Unity version.

Thank you for reporting this!