Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Procedural Koi Carp Shader?

Discussion in 'Shaders' started by derkoi, Apr 30, 2020.

  1. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,237
    Hey guys, I'm trying to create procedural Koi Carp colors for my game. I'm using amplify Shader Editor as I'm useless at shader coding.



    I thought about using several noise layers in various scales and tinting them different colors but overlaying them is an issue. I need each color to show through, like painting on top of each other.

    Any ideas how this can be done? Cheers.
     
  2. Wayward_Studios

    Wayward_Studios

    Joined:
    Dec 15, 2018
    Posts:
    23
    you can jsut lerp the different noise textures together with the greyscale value as an interpolator input, or you cutoff the noise texture at a certain point and use that as an interpolator input to get the sharp edges. So you could have a abse texture or color and then lerp all the noise textures you'd like on top of that.
     
    derkoi likes this.
  3. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,237
    Thanks. I could also pack the different noise into one texture to save space too right?
     
  4. Wayward_Studios

    Wayward_Studios

    Joined:
    Dec 15, 2018
    Posts:
    23
    sure,you use the different color channels for the different noises or even different color stages within the same color channel
     
  5. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,237
    Not sure how I can add say red noise layer over a black main with some white noise without mixing the colours?
     
  6. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    @derkoi I'm not sure if I understand your issue, but you could combine different image components with lerp, just create a mask and then mix source A and B with that lerp. Just like as if you were doing some compositing in a post-processing software or doing some masking Photoshop. But that way you could layer things, apply different patterns to different areas and so on.