Search Unity

Need help combining two shaders

Discussion in 'Shaders' started by starseekergames, Mar 29, 2019.

  1. starseekergames

    starseekergames

    Joined:
    Nov 30, 2016
    Posts:
    10
    Can someone please help me,
    I've no clue regarding shader codes and I really need these two shaders to be combined.

    They're both not my creation, and credits where they are due.
    One shader creates an 'outline' to an object,
    the other shader is a dissolved effect for an object.

    Basically I need the outlined object to have a dissolve feature but it is handled by separate shaders, so I couldn't attach both to one material.

    And, if I attach two materials in the same MeshRenderer it wouldn't have the effect I wanted.
    If anyone could please help me, I don't understand my error in attempting to fix the code since it returned

    CGPROGRAM cannot contain #pragma surface as well as other programs
    Unexpected identifier "UsePass". Expected one of: typedef const void inline uniform....

    That's the error I receive when using my effort to combine the two from the DissolveOutline.shader.
    Though I'd appreciate the feedback of where / what I did wrong, I really appreciate if someone could post the solution as well.
     

    Attached Files: