atteneder / glTFast

Efficient glTF 3D import / export package for Unity
Other
1.24k stars 250 forks source link

Issue with HDRP DecalProjector #561

Open jf-gagnon opened 1 year ago

jf-gagnon commented 1 year ago

Describe the bug At runtime, importing and instantiating a new gltf does not receive any decals from HDRP DecalProjector.

To Reproduce Steps to reproduce the behavior:

  1. Ensure your Unity project uses HDRP
  2. Go into play mode
  3. Import a gltf mesh
  4. Create some GameObject having HDRP DecalProjector
  5. Note the gltf mesh does not receives any decals

Expected behavior Decals should appear

I think the spawned mesh's material should have it's renderQueue updated. That is, HDRP exposes HDRenderQueue.Priority.OpaqueDecal and HDRenderQueue.Priority.OpaqueDecalAlphaTest. See MaterialExtension.HDRenderQueue.ChangeType() for details.

jf-gagnon commented 1 year ago

After discussing with people from the HDRP team, there might be 2 issues: