Search Unity

Shader from asset bundle does not have passes

Discussion in 'Editor & General Support' started by a3dline, Mar 19, 2020.

  1. a3dline

    a3dline

    Joined:
    Dec 28, 2013
    Posts:
    17
    I have small bundle for test.
    How you can see bundle has the shader and shader variant collection.
    But int the editor shader is ping how yu can see in material.
    If we look at the shader meta data we will see no passes
    (Shader is correct for the my target compilation)

    What i tryed to do:
    1. Remove all shader_features as shader compilation pragmas
    2. Add shader variant colelction for the same bundle there is shader

    Also i tryed add shader to "Always include shaders" in graphic settings. It is solved problem for bundle simulation in editor becouse bundle has reference for shader in editor

    But if i add all my shader to "Always include shaders" then it will not strip unused shader features and compile pragmas and all shader will be compile on application start up.

    My post for Unity Tech peoples, becouse i read a lot information about this problem. And i couldn't found exact explanation how it is work.

    Can you expane me when shader compile for the bundle. How shader undestend what variants need to add to passes. What different between shader feature and shader compile for bundle and compilation.

    p.s. i am use scriptable build pipeline for bundles

    THX
    upload_2020-3-19_6-53-50.png upload_2020-3-19_6-55-24.png
     
  2. a3dline

    a3dline

    Joined:
    Dec 28, 2013
    Posts:
    17
    Hi guys from Unity. I understand that you have a lot of work, but could you at least give me some answer. Your bundled system crashes. I’ve been suffering from this problem for 4 days and don’t know what to do. My shaders added to the bundle look pink in the build. In doing so, I tried to make a new Unlit and the picture repeats.