Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Replacing many colors in Shader

Discussion in 'Shaders' started by FrancM12, May 7, 2021.

  1. FrancM12

    FrancM12

    Joined:
    May 1, 2017
    Posts:
    12
    I have a texture which defines various regions on a map by an unique color. Each region is owned by an entity with an unique color associated with it. I want to replace the color of each region with the color of its owner.

    upload_2021-5-7_1-42-47.png

    I know how to do a single color replacement shader but how should I approach changing many colors?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    What did Europe do to you?!


    Your best bet for modifying a lot of individual color values is going to be using a 3d volume texture.
     
    FrancM12 likes this.