Search Issue Tracker

By Design

Votes

0

Found in [Package]

preview.13 - 0.0.1

Issue ID

1172468

Regression

No

[DOTS][ECS][Hybrid Renderer] MaterialPropertyBlock instanced Data does not get correctly updated

Package: Entity Component System (ECS)

-

Customer is currently making use of BatchRendererGroup using the RenderMeshSystemV2 of Hybrid Renderer, it's modified in some Areas but the Core Batching is still the same logic. The Customer has added Material property blocks, which are working well when no culling happens. When individual objects get culled from a batch, the MPB instanced data does not get correctly updated, is this expected? The Transform Data gets correctly updated to match the visible objects.

To reproduce:

1. Download attached "ECS-RenderBatch-MPB.zip" project and open in Unity
2. Open "ECS-MPB-Batching-Test" scene
3. Enter to Play mode
4. Pause Play mode
5. Select "Main Camera" gameObject and change Y Position with Mouse
6. Observe that Colors starts jumping around to different Entities due to bad indexing of instancing data

Notes:
- This might be Hybrid Renderer or Entities bug
- It is impossible to check for Regression of Hybrid Renderer because it is Modified by Customer
- It is impossible to check for Regression of Entities because when Upgrading to preview.24 - 0.0.12 or lower whole Project becomes Corrupted
- It is impossible to check on Unity 2018.4, 2019.2 and 2019.3 because Project becomes Corrupted
- In Package Found Version I pasted Hybrid Renderer version
- Another issue is if Customer set the Material property block through the SetInstancingData function of the Batch Group and set the Material property block to Null in AddBatch, then Customer gets no rendering at all
- Video and portion of the Code for Reference are added in Comments section

Reproduced on Unity 2019.1.7f1 and 2019.1.11f1

  1. Resolution Note:

    Currently we do not support setting per instance data via an array in material properly block in the BatchRenderer. We intend to add support for this in the 19.3 release cycle (the hybrid renderer is a preview feature we are constantly improving).

Comments (1)

  1. Baggers_

    Sep 26, 2019 10:38

    Is this still on track for 19.3? From looking at InstancedRenderMeshBatchGroup.cs in the latest beta it would seem that per instance data is still not supported.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.