DecalProjector runtime creation makes screen black in the build.

The problem does not occur in the editor.
In the build, DecalProjector creation makes the screen black, just GUI is visible.
The problem was encountered in 2019.3.0f3 with HDRP 7.1.7
The problem was reproduced in the project out of the box.

Here is the log: Mono path[0] = 'C:/proj_unity_18_3_11/dtest/decal_test_Data/Managed'Mono confi - Pastebin.com

Hi !

Thanks for reporting, and sorry for the delay.
The issue has been identified, and reported : Unity Issue Tracker - [HDRP] Decal created in player breaks rendering.

While waiting for a fix, here are two workarounds:

  • Instantiate a properly setup DecalProjector prefab object

  • Disable the gameobject before adding a DecalProjector component, and re-enable it after having set a proper HDRP/Decal material.

1 Like

It seems there are many bugs related to the new decal projector component, even in the RC packages of HDRP.
First the decal shader stripping bug and then the ghost copies bug.

I guess it gets not much love from developers as other new things like volumetric lighting.