Search Unity

Change shader at runtime

Discussion in 'Getting Started' started by s123d, Mar 14, 2018.

  1. s123d

    s123d

    Joined:
    Jan 23, 2018
    Posts:
    8
    I'm a beginner in unity and I'm wondering how the most basic tasks turn into challenges...

    im was looking for a way to fade characters in in to my game, and I learned that fading isnt an option because you have to change the render mode of the shader temporarely to fade, thats very complicated and looks ugly.

    So which techniques are used in realistic games, and where can I learn this?
     
  2. Bill_Martini

    Bill_Martini

    Joined:
    Apr 19, 2016
    Posts:
    445
    Just make sure the shader can fade in the first place and then get the materials color of the object and change the alpha. You don't need to swap shaders.
     
  3. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    How do you clap your hands?

    That is a basic thing. Yet nobody here could explain how it is done (go away neuroscientist).

    So things that seem basic end up being exceedingly complex when you begin thinking about breaking them down to a step-by-step level. And to tell a computer to render an image, you have to tell it precisely what to do, step by step.

    Now, with this in mind, something I might call a basic task is turning a computer on. From there on, however, things get very complicated. So go slowly and forget about self-aware, judgmental notions. It's the only way to learn complicated things.