Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Material/shader looks great in editor, but solid green/red in build

Discussion in 'Shaders' started by Kalinka, Sep 22, 2019.

  1. Kalinka

    Kalinka

    Joined:
    Aug 26, 2014
    Posts:
    1
    I am a complete Unity newbie, in the beginning stages of making my first app.

    I exported a mesh+texture from a different piece of software (Houdini) and am trying to get it to show up in Unity. I copied my shader from an online tutorial at https://gist.github.com/jhorikawa/7a236ae0b801bf2aca2d8a3038b9bf40

    It looks as expected in the editor, but when I run it, I get a weird green/red material. Any ideas what might be happening?

     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    Looks like the shader is for visualizing vertex colors, so you probably are using vertex colors? If it looks ok in editor window, I wonder if you are doing something to that vertex data when you go to run mode.