Search Unity

Z Shader crazy export problem

Discussion in 'Scripting' started by GabeF, Jan 8, 2013.

  1. GabeF

    GabeF

    Joined:
    Sep 28, 2012
    Posts:
    38
    Hi Guys,

    I am using a Shader by writing a first pass to the Z buffer so that I can get a nice opacity blend off. Everything is great in the unity engine, but when I export the data, I get weird pink shader issues. I have added a video to show you what I mean. The export is the version with issues, and as you can see, running it in unity works fine.

    Why is this happening? Does anyone know?

    Here is the video:
    http://www.filedropper.com/shaderissue

    by the way in the code, I use material.SetFloat("_Alphamult",2); to adjust the transparency over time
    attached the shader in question in the text file

    View attachment $ZShader.txt

    Any Ideas?

    Gabe
     
  2. GabeF

    GabeF

    Joined:
    Sep 28, 2012
    Posts:
    38
    For anyone interested, it turns out that the shader that it switches to simply didn't compile for runtime, so an alternative was to reference the shader through a script, put it in a global variable, and access that.