Search Unity

Question Water shaders

Discussion in 'Shaders' started by Monkey_M, Dec 2, 2020.

  1. Monkey_M

    Monkey_M

    Joined:
    Mar 10, 2020
    Posts:
    36
    In my game I chose about 500 materials with bright colors as you can see in the small example below:
    GoodColor.png
    now i am trying to insert a water shaders following this video:


    I read that I have to add "unity universal material" and convert my old materials. But if I do that all my colors get darker: BadColor.png

    How can I go about creating that effect while keeping my initial colors?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    Are you are aware that if materials differ by some property, you can have just one common material, with a property. For example color.
    In case like you showed above, it could be just one material, with 3 different colors property.
     
  3. Monkey_M

    Monkey_M

    Joined:
    Mar 10, 2020
    Posts:
    36
    Forgive me but I'm really a noob. Could you explain better what you mean?
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    For example make shader in such way, that it can accept color as an input, when is attached to a material. Then you can have many different colors variations, using single material. Just like default material shader.

    You also need watch out for draw calls count.
    If you are not familiar with these, I suggest look up for draw calls keyword.
     
  5. Monkey_M

    Monkey_M

    Joined:
    Mar 10, 2020
    Posts:
    36
    Thanks for the quick reply!
    I have made some tests but I cannot understand.

    I have a material (standard) with rgba (255,0,0,255)
    I insert "unity universal material"
    I do Update Project Materials to UniversalRP Material
    Now i have a material (Universal Render Pipeline/Lit) rgba (255,0,0,255)

    But this material turns out darker than the previous one. How do I make it the same as the initial one? it's possible?
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    There may be some differences between rendering pipelines.
    You may want to pley withe with enviremntal light, if you want make every object to appear brighter, or I would rather suggest to apply material emission.

    You want to check and compare, whqt will happen in either cases, when you start applying additional lights source. Now you seems using only default scene lightening.
     
  7. Monkey_M

    Monkey_M

    Joined:
    Mar 10, 2020
    Posts:
    36
    I don't know what an emission is, I'll do a search.
    Thank you so much for now!