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

Decals rendering on top of particles (Unity 2020.1/URP 8.2.0) #30

Open
LuisEduardoR opened this issue Aug 14, 2020 · 6 comments
Open

Decals rendering on top of particles (Unity 2020.1/URP 8.2.0) #30

LuisEduardoR opened this issue Aug 14, 2020 · 6 comments

Comments

@LuisEduardoR
Copy link

LuisEduardoR commented Aug 14, 2020

I'm having a problem in which the decals always render on top of particles from the default Particle System. I'm using Unity 2020.1.1f1 and URP 8.2.0. Here's an example of the problem with the related particle Material and DecalData:

Issue_Example
Issue_Particle
Issue_Decal

I've tried changing the Priority in the particle material but it had no effect. Is this a bug or a limitation of the system? Or I'm just doing something wrong?

@LuisEduardoR
Copy link
Author

UPDATE: Apparently this happens with other transparent surfaces:

Issue_Transparent
Issue_Transparent_Material

@alexbagnolini
Copy link

Did you exclude the particle system's layer from the Decal settings?

@LuisEduardoR
Copy link
Author

LuisEduardoR commented Sep 15, 2020

I've just made the following test:

  1. Create a default Particle System (GameObject -> Effects -> Particle System)
  2. Create a new Decal Data asset (Create -> kTools -> Decals -> Decal Data) and assign the desired texture to it (only change I've made)
  3. Place a decal with the Decal Data just created on the Scene in a way the particles appear on top of the decal

And the problem persists.

Both particle system's and decal's GameObjects are on the "Default" layer and "Layer Mask" on the "Projection Options" from the Decal Data asset is set to "Everything".

I've also tried with a quad using the Glass Side material I had shown above and there was also a problem.

@LuisEduardoR
Copy link
Author

Did the same test described above but with the Particle System in the "TransparentFX" layer and excluded this layer from the "Layer Mask" on the "Projection Options" from the Decal Data asset.

The problem still persists.

@alexbagnolini
Copy link

This decal projector doesn't pass through "Transparent" objects.
You have to exclude the layer from the layer mask.

We use it all the time in our project to project (no pun intended) something on the ground, ignoring everything on top (ranging from meshes to visual effects to particle systems).

In your example make sure you applied the layer to all particle systems involved in the simulation.
Also, you have to include the changes in this pull request, as the current implementation is broken #24
After you apply the changes, make sure to reset your layer masks (select Everything and then again check / uncheck the layers you want to keep).

@LuisEduardoR
Copy link
Author

I've done as you said: changed the lines from the commit, changed "Layer Mask" on the "Projection Options" from the Decal Data asset to "Everything" and then unchecked "TransparentFX" (the layer I put the particle system in) but I had no change, did I miss something?

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

2 participants