Search Unity

Using [PerRendererData] with Lightweight RP

Discussion in 'Shaders' started by Vyzier, May 5, 2019.

  1. Vyzier

    Vyzier

    Joined:
    Feb 22, 2015
    Posts:
    21
    How do I create a Lightweight RP shader that has [PerRendererData] on the _BaseColor? I want to have different colors for my objects without using thousands of materials.Thanks!
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    This doesn’t do anything apart from hide the value in the inspector. It’s a legacy thing related to Unity 4.0 sprite renderers and has no use today. You can use material property blocks with any material without incurring the cost of creating new materials.

    Instancing is a different thing. Right now the only way to make shaders with instanced values is to hand write the shader.
     
  3. Vyzier

    Vyzier

    Joined:
    Feb 22, 2015
    Posts:
    21
    Thank you very much!