Search Unity

Change Rendering Mode & Queue of "Standard" shader

Discussion in 'Shaders' started by SimRuJ, May 13, 2022.

  1. SimRuJ

    SimRuJ

    Joined:
    Apr 7, 2016
    Posts:
    247
    Hello everyone,

    I added "Cull Off" to the first pass of the first subshader of the "Standard" shader (default code here) in Unity 2021.3.2f1 and now I also want to change the "Rendering Mode" and "Render Queue" in its *.shader file, so they show up as "Transparent" and e.g. 2900 in the inspector (I've also got another transparent shader that this one has to work with).

    I already changed the "RenderType" tags of both subshaders to "Transparent" (instead of "Opaque") but at runtime it automatically switches back to "Opaque" and when I change the queue to e.g. 2900 in the inspector, then the console logs:
    If I also use the "Queue" tag with the mentioned values with "Transparent", then that message is logged as soon as the GameObject loads.

    I thought values from 0 to 2500 are used for opaqueness and 2501 to 5000 for transparency, with around 3000 being "Transparent". Did I misunderstand how the render type and queue work? How do I set them to the chosen values in the *.shader file, so the changes work and show up in the editor/inspector?
     
    Last edited: May 13, 2022