Dustyroom / flat-kit-doc

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

URP Decal Projector doesn't work with the Stylised Surface Shader #59

Closed dicemaster5 closed 2 years ago

dicemaster5 commented 2 years ago

Describe the bug Unity's new 2021.2 URP decal render feature does not work on Stylised Surface Shader materials.

To Reproduce Steps to reproduce the behavior:

  1. Add the Decal Renderer Feature to the URP Renderer.
  2. Create a Material, and assign it the Shader Graphs/Decal shader. In the Material, select the Base Map and the Normal Map.
  3. Create a new Decal Projector GameObject, or add a Decal Projector component to an existing GameObject.
  4. Move the projector onto a Stylised Surface Shader material.
  5. See error: nothing will be projected onto the material surface.

Or follow the official docs on the Decal feature for more info

Expected behavior The projected decal should appear on the Stylised Surface Shader material objects like it does with Unity's Standard URP shaders.

Screenshots Gif image image

Unity details:

dustyroom-studio commented 2 years ago

Thanks for the clear bug report! We were able to reproduce and fix the issue. The update should appear in the Asset Store today.

dicemaster5 commented 2 years ago

Unfortunately after updating to Version 2.6.0 the issue is still present for me, decals still do not show on Stylized Surface Materials.

dustyroom-studio commented 2 years ago

That's strange. Can you please share the updated debug info from the Readme?

dustyroom-studio commented 2 years ago

Also, could you please try re-importing Flat Kit with the cache clean-up? Please locate the [Readme] file in the Flat Kit folder and press the Clear Cache button? After that, please try re-importing Flat Kit and pressing Configure Project For URP button.

flat-kit-readme-clear-cache-button

dicemaster5 commented 2 years ago

I have cleared the cache and re-imported the asset, still no change. Although I have discovered that the decal render feature includes 3 different settings "techniques": Automatic, DBuffer and Screen Space. image

The Decal only works with the screen space technique on the Stylized Surface Material but results give a non smooth shaded look to the object where the decal is present. (see image) image

image

Flat Kit version 2.6.0 Unity 2021.2.0f1 Dev platform: WindowsEditor Target platform: StandaloneWindows64 URP installed: True, version 12.1.0 Render pipeline: UniversalPipeline Quality config: UniversalRP-HighQuality Graphics config: UniversalRP-HighQuality

dustyroom-studio commented 2 years ago

@dicemaster5 the update seems to be there, but not sure why there's no effect. We'll keep looking and let you know.

dustyroom-studio commented 2 years ago

Still trying to reproduce this with Flat Kit 2.6.0. @dicemaster5 can you please take the screenshot of the Flat Kit material on which decal should be rendered? Is it the "Stylized Surface Outline" by any chance?

dicemaster5 commented 2 years ago

Yes. image

image

dustyroom-studio commented 2 years ago

That shader has been deprecated, please use the Stylized Surface one. It now has the outline feature. The Stylized Surface With Outline materials should show a warning about that, which I don't see in your screenshot. We're going to fix that, sorry for the confusion.

On Wed, Nov 3, 2021, 15:39 DiceMaster @.***> wrote:

Yes. [image: image] https://user-images.githubusercontent.com/32296289/140070302-db71add5-8fa8-4fdc-af2d-55f0892f8aef.png

[image: image] https://user-images.githubusercontent.com/32296289/140070464-2e708f6f-90d4-46fd-b483-0f7cf07c43bc.png

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/Dustyroom/flat-kit-doc/issues/59#issuecomment-959101838, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARZVF6SU3YHZ4YVS74NEJM3UKE3R7ANCNFSM5HEHTRNA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

dicemaster5 commented 2 years ago

Ah! I did not know about this deprecation, the Stylized Surface shader doesn't show up in the Flat Kit shader tab annoyingly so I didn't see it as an alternative option.

image

But unfortunately for me, this still doesn't work with the decals. This shader also doesn't seem to have any outline features from what I can see.

image

image

dustyroom-studio commented 2 years ago

Thanks for the details. The missing shaders and the missing warning about the shader deprecation (please, see the pic below) point to the fact that something went wrong during the installation. The list of the shaders should be the following: Stylized Surface, Stylized Surface with Outline, Terrain, LightPlane, Water, Gradient Skybox.

flat-kit-stylized-surface-with-outline-deprecation-warning

flat-kit-list-of-shaders

What you could try to do is the following.

If this doesn't help and the list of the shaders is not looking right, please, try:

The cache can be found here: %APPDATA%\Unity\Asset Store-5.x
(hidden folder, press Win+R, paste this path and press Enter, then delete the Dustyroom Folder)

Please, let us know if it has been fixed.

dicemaster5 commented 2 years ago

I did those steps but it still didn't work, so I also went ahead and deleted the Flatkit folder from my assets folder and re-downloaded the asset and reimported it from scratch and it now works! I can also now see the deprecated warning and the rest of the shaders in the shader tab.

image

Doing this has also fixed other errors that I was having with the Frame debugger previously.

Thank you for all your help!