Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Rendering at different times in the queue without instancing a material.

Discussion in 'General Graphics' started by quinng, May 1, 2019.

  1. quinng

    quinng

    Joined:
    Jul 2, 2015
    Posts:
    10
    I'm working on a project that involves me rendering multiple duplicates of an object, each at a different time in the render queue. Currently this means that I need to create a separate material instance for each object and use material.renderQueue to set it to the appropriate place in the queue. Otherwise, the materials are the same and would not need to be instanced.

    This is for a nested portal effect, and my concern is that as I try to render more and more layers with more and more objects, the number of material instances I need to create will begin to take up significant space in memory.

    So my question is. Is there a way to get the pipeline to render two or more meshes using a shared material but at different times in the queue? It would be nice if I could simply pass the intended queue position in as part of a property block, but that doesn't seem to be the case.