Search Unity

Some errors with ShaderFX -> CGFX -> ShaderLab

Discussion in 'Shaders' started by Vincentez, May 17, 2009.

  1. Vincentez

    Vincentez

    Joined:
    May 15, 2009
    Posts:
    3
    So, I'm very much a noob when it comes to shaders, so could someone help me with this one? :)

    I made a shader in ShaderFX, exported it to .cgfx-format and now I'm trying to manually port it to ShaderLab. Everything seems to go rather fine, except for these few errors it gives that seem to prevent some crucial parts of the shader from working.

    Could someone check these errors and tell me what exactly they mean and how it would be best to try to fix them?

    Cg in program 'main': error C1038: declaration of "objTangentXf" conflicts with previous declaration at (398) at line 401

    Cg in program 'main': error C1043: size of dimension cannot be less than 1 at line 401

    Cg in program 'main': error C1056: invalid initialization at line 401

    Cg in program 'main': error C1060: incompatible types in initialization at line 401


    Cg in program 'main': error C1038: declaration of "objTangentXf" conflicts with previous declaration at (453) at line 456

    Cg in program 'main': error C1043: size of dimension cannot be less than 1 at line 456

    Cg in program 'main': error C1056: invalid initialization at line 456

    Cg in program 'main': error C1060: incompatible types in initialization at line 456