Color Swap Shader Under 4 Minutes - Unity 2D

Ғылым және технология

Woohoo! I finally found out! Enjoy the video.
Using Unity 2019 in a 2D project using Universal RP from package manager.
Comment any questions, I'll try and help.

Пікірлер: 39

  • @QFGEE
    @QFGEE2 жыл бұрын

    I can't find the sprite lit master node, I only have Fragment and Vertex node.

  • @codegnatstudios

    @codegnatstudios

    2 жыл бұрын

    Are you in 2D?

  • @jumpkut

    @jumpkut

    2 жыл бұрын

    Those are basically the same things, its just Unity's new standard to have a fragment/vertex stack instead of a master node.

  • @rosathequeen

    @rosathequeen

    10 ай бұрын

    @@jumpkut please tell how, im trying to connect it just like in the video but it doesn't work with this new fragment vortex stuff and my main preview is just pink!!

  • @Khud0
    @Khud0 Жыл бұрын

    1) You helped me make my first shader. 2) It's actually exactly what I was looking for. 3) It only took you 4 minutes?! Wow! I bow before thee, professor!

  • @JagGentlemann
    @JagGentlemann10 ай бұрын

    Thank you for the video! I've spent an entire day looking for this and it was in a short 4 minute video. I had some problems but I figured it out.

  • @chrismadachik9732
    @chrismadachik9732 Жыл бұрын

    exactly what i was looking for, great video

  • @mr.m304
    @mr.m3042 жыл бұрын

    fast and simple. All I need. Thanks:)

  • @rouon39
    @rouon39 Жыл бұрын

    Great video!

  • @OliverContreras
    @OliverContreras Жыл бұрын

    Very Useful, Thank you!

  • @WoobyHob
    @WoobyHob Жыл бұрын

    Hi there, I am trying to color swap a set of colors. However there would be cases of swapping over 20 colors. What would be the best way to do it? Worst case scenario would be having lots of color variables and replace color node. I was thinking of exporting 2 color palette ( base and swap) into a texture and having it point to the color, but that would only be 1 color at a time.

  • @NeoLoveCookie
    @NeoLoveCookie2 жыл бұрын

    You're a genius !

  • @codegnatstudios

    @codegnatstudios

    2 жыл бұрын

    Thanks, I try my best!

  • @normanrichwood620
    @normanrichwood620 Жыл бұрын

    Now it looks a little different, I mean the last node in urp. But overall it works!

  • @leonedandrewTumbaga
    @leonedandrewTumbaga Жыл бұрын

    not working for me whenever i pick a color it doesn't change

  • @hitarthkhakhar4819
    @hitarthkhakhar4819 Жыл бұрын

    how to change the color of a sprite without changing its border color

  • @jumpkut
    @jumpkut2 жыл бұрын

    My problem is this only seems to work properly with pixel art, any other raster art and i get super bad fringing no matter what i do with the range/fuzziness

  • @codegnatstudios

    @codegnatstudios

    2 жыл бұрын

    Yeah, all I can recommend is to export the raster art without anti aliasing after painting it out with hard brushes.

  • @wizofwonders

    @wizofwonders

    Жыл бұрын

    Well this is probably more work but you could probably create a second texture and color each spot on your art that you want to change the color and use the second texture’s coordinates to change the color of your art after changing it to grayscale first. Unfortunately this might be costly though.

  • @walkersheep3333
    @walkersheep3333 Жыл бұрын

    Thanks!

  • @ramshyblood
    @ramshyblood2 жыл бұрын

    How do I use two colors to change the bottom of the character, since the master only allows a single connection at the end?

  • @codegnatstudios

    @codegnatstudios

    2 жыл бұрын

    You want to add another set of color replace nodes. I don't know if you need to reprocess the transparency, but you can probably just do that at the end once.

  • @ramshyblood

    @ramshyblood

    2 жыл бұрын

    @@codegnatstudios thx, and how apply transparency to a one of those colors?

  • @codegnatstudios

    @codegnatstudios

    2 жыл бұрын

    @@ramshyblood That's a bit harder. I don't think that it's as simple as just putting transparency on the node. Maybe I'm wrong and you just need to change transparency on the final color. I know transparency on shaders is kind of tricky.

  • @rosathequeen
    @rosathequeen10 ай бұрын

    I can't find the sprite lit master node, I only have Fragment and Vertex node. AND nothing i do with those will get it to work my main preview is just pink :(

  • @WerdoTheBlob

    @WerdoTheBlob

    5 күн бұрын

    You have to actually set URP as your render pipeline in Unity, and then after that you have to mess around in the graph settings with the normal Lit/Unlit settings (not the sprite ones) until it works eventually lmao. Using Transparent and Alpha with the Unlit material worked for me. You also have to use the Alpha from the original texture and put it into the output directly. Hopefully that helps kinda.

  • @rosathequeen

    @rosathequeen

    2 күн бұрын

    @@WerdoTheBlobYeah thanks, but i pretty much figured everything out by now it’s been a year lol hard to believe it’s been that long

  • @pavlosgamesking7532
    @pavlosgamesking7532 Жыл бұрын

    Can I control Alpha color too with this or only the RGB?

  • @codegnatstudios

    @codegnatstudios

    Жыл бұрын

    You can probably control the alpha if you add some more nodes

  • @dophelsinette
    @dophelsinette3 жыл бұрын

    But what if when you open the project it says 'godot' instead of unity?

  • @codegnatstudios

    @codegnatstudios

    3 жыл бұрын

    I think you installed the wrong package

  • @dophelsinette

    @dophelsinette

    3 жыл бұрын

    @@codegnatstudios no, I'm pretty sure I followed the tutorial step-for-step...

  • @CloveBunny
    @CloveBunny3 жыл бұрын

    Very informative. What if I don’t have any of this and have no clue what anything you’re talking about means?

  • @codegnatstudios

    @codegnatstudios

    3 жыл бұрын

    Hit rewatch and enjoy

  • @CloveBunny

    @CloveBunny

    3 жыл бұрын

    @@codegnatstudios hmm

  • @dophelsinette
    @dophelsinette3 жыл бұрын

    Wait- does unity use HDRP as default now?

  • @codegnatstudios

    @codegnatstudios

    3 жыл бұрын

    Don’t think so

  • @QFGEE
    @QFGEE2 жыл бұрын

    Latest version it's Create - Shader Graph - URP - Lit Shader Graph

  • @codegnatstudios

    @codegnatstudios

    2 жыл бұрын

    Thanks for the info!

Келесі