Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Exact criteria to make the shader LWRP compatible?

Discussion in 'Graphics Experimental Previews' started by 5argon, Jul 20, 2018.

  1. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    Previously I have written a custom simple shader to use with legacy vertex lit. I deliberately stripped many functions for it to be as fast as possible while giving me the correct look. My game does not use lighting at all and I even use texture color as a fake lighting. Also my shader is not GPU instancing compatible.

    Today I wanted to try LWRP, in here https://blogs.unity3d.com/2018/02/2...er-pipeline-optimizing-real-time-performance/ it stated that we need a "compatible" shader to be able to utilize this faster pipeline.

    I dragged the LWRP asset and test the game without editing my shader and it seems everything still looks correct. Does it means :

    - My shader is already LWRP compatible and I am benefitting from faster, lighter pipeline. (As stated in that page "Compared to the legacy pipeline forward rendering, which performs an additional pass per pixel light within range, using the LW pipeline will result in less draw calls.")

    - Or I have to do something to my old shader still to benefit from this? If so, any way to check if it is "rendering lightweight" already or not?
     
    Last edited: Jul 20, 2018
  2. stonstad

    stonstad

    Joined:
    Jan 19, 2018
    Posts:
    660
    This is a great question. I would also be interested in hearing someone’s thoughts on this.