Search Issue Tracker
Duplicate
Votes
1
Found in [Package]
7.1.7
Issue ID
1211761
Regression
No
[HDRP] Decal created in player breaks rendering.
Steps to reproduce:
- Unzip the player from link in comments.
- Open "HDTemplate-srp-tarball.exe"
- Press spacebar to create a decal projector through script.
Result: Application freeze, with following errors :
---------------------------------------------------------
ArgumentNullException: Value cannot be null.
Parameter name: sourceArray
at System.Array.Copy (System.Array sourceArray, System.Array destinationArray, System.Int32 length) [0x00003] in <c79628fadf574d3a8feae0871fad28ef>:0
at UnityEngine.Rendering.HighDefinition.DecalSystem+DecalSet.SetCullResult (UnityEngine.Rendering.HighDefinition.DecalSystem+CullResult+Set value) [0x00033] in H:\Templates\HDTemplate-srp-tarball\Library\PackageCache\com.unity.render-pipelines.high-definition@53c7c50d74a6-1579085591005\Runtime\Material\Decal\DecalSystem.cs:846
at UnityEngine.Rendering.HighDefinition.DecalSystem.LoadCullResults (UnityEngine.Rendering.HighDefinition.DecalSystem+CullResult cullResult) [0x00036] in H:\Templates\HDTemplate-srp-tarball\Library\PackageCache\com.unity.render-pipelines.high-definition@53c7c50d74a6-1579085591005\Runtime\Material\Decal\DecalSystem.cs:1130
at UnityEngine.Rendering.HighDefinition.HDRenderPipeline.ExecuteRenderRequest (UnityEngine.Rendering.HighDefinition.HDRenderPipeline+RenderRequest renderRequest, UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.HighDefinition.AOVRequestData aovRequest) [0x00183] in H:\Templates\HDTemplate-srp-tarball\Library\PackageCache\com.unity.render-pipelines.high-definition@53c7c50d74a6-1579085591005\Runtime\RenderPipeline\HDRenderPipeline.cs:1848
at UnityEngine.Rendering.HighDefinition.HDRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Camera[] cameras) [0x00c2e] in H:\Templates\HDTemplate-srp-tarball\Library\PackageCache\com.unity.render-pipelines.high-definition@53c7c50d74a6-1579085591005\Runtime\RenderPipeline\HDRenderPipeline.cs:1723
at UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera[] cameras) [0x0001c] in <0bc11320470b45a397aa1779b1da406c>:0
at UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr) [0x0003d] in <0bc11320470b45a397aa1779b1da406c>:0
(Filename: <c79628fadf574d3a8feae0871fad28ef> Line: 0)
XRSystem.ReleaseFrame() was not called!
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
UnityEngine.Rendering.HighDefinition.XRSystem:SetupFrame(Camera[], Boolean, Boolean) (at H:\Templates\HDTemplate-srp-tarball\Library\PackageCache\com.unity.render-pipelines.high-definition@53c7c50d74a6-1579085591005\Runtime\RenderPipeline\XR\XRSystem.cs:114)
UnityEngine.Rendering.HighDefinition.HDRenderPipeline:Render(ScriptableRenderContext, Camera[]) (at H:\Templates\HDTemplate-srp-tarball\Library\PackageCache\com.unity.render-pipelines.high-definition@53c7c50d74a6-1579085591005\Runtime\RenderPipeline\HDRenderPipeline.cs:1206)
UnityEngine.Rendering.RenderPipeline:InternalRender(ScriptableRenderContext, Camera[])
UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr)
(Filename: H:/Templates/HDTemplate-srp-tarball/Library/PackageCache/com.unity.render-pipelines.high-definition@53c7c50d74a6-1579085591005/Runtime/RenderPipeline/XR/XRSystem.cs Line: 114)
---------------------------------------------------------
Expected : A decal projector should be created and rendered, displaying the "3D noise" texture.
Reproduces with :
- Unity 2019.3.0f5 / HDRP 7.1.7
- Unity 2019.3.0f6 (3805be3cb06a) / HDRP 7.2.0 (74e716d78553d6ab19142f17f38903b6b6c54521)
Notes:
- Import the attached "RuntimeDecals.unitypackage" file to see the scene setup.
- Holding the s key while pressing spacebar will create the decal projector in a safe manner : the gameobject is disabled before adding the component, and re-enabled after assigning a proper decal material.
- I highly suspect that it is caused byt the decal projector default material that doesn't use the HDRP/decal shader. Suggestions : Change the default material assigned to the decal material to use the proper shader, and add a safeguard to avoid breaking the rendering if the assigner shader doesn't suit to decals.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Console shows Exception: {"error":"not found","detail":["not found"]} after opening Build History window
- [HDRP] Volumetric cloud shadows disappear when there is no directional light shadows
- “Selector” column names in the Search window are lowercase when added
- Install List Project Counter Panel can be right clicked through and Install Context Menu can be opened disabling Project Counter Panel's buttons
- [MacOS] Scene is marked/flickering as dirty (with asterisk) when dragging a Material on a GameObject in Scene view
Add comment