orels1 / orels-Unity-Shaders

A collection of practical Unity shaders for your next project
https://shaders.orels.sh
Other
181 stars 15 forks source link

RGBA Mask module #81

Open Rionquosue opened 3 months ago

Rionquosue commented 3 months ago

I would like to have an RGBA mask module that allows for the use of 4 or more RGB HSV colour selections for the base albedo or for a detail masked colour selection.

For the time being using a PSD that has the masks as layer masks instead works essentially the same way.

Poiyomi has this module in both toon & pro. The main usecase for this as a creator is providing base masks that allow for a level of customization in the unity editor. Shifting only the colour of hair tips, horns, rosettes, or other parts of clothing using float sliders in VRChat. https://www.poiyomi.com/color-and-normals/rgba-color-masking https://www.youtube.com/watch?v=nxUfdVQFlCY

I know me and some other creators would REALLY appreciate this getting added as a module because having to spend 10+ minutes just importing poi and waiting for it to compile later for uploads gets old fast when we have to iterate so often.

orels1 commented 3 months ago

Hey! I can do that, but I got a question. Do you want this module to be included by default in something like orels1/Toon/Main shader? Or is providing a module to be used as a thing you can just mix and match yourself using my Configurable Shaders good enough?

Rionquosue commented 3 months ago

Ideally as a module in both standard/toon, but having it as a module for the configurable shader would be good enough.

As far as end user stuff goes it would definitely be better to have an editor script pop up that says "hey add this shader to VCC" than to redistribute the shaders themselves though, that way they can continue to get updates for new features you add long-term - If that's a hurdle though I will gladly take it as just a module for the time being and help put it through testing.

lackofbindings commented 3 months ago

Not to side-track this but if you need a solution sooner rather than later I have already written a module for this in my personal repo: https://github.com/lackofbindings/ORLModules/blob/main/Packages/com.lackofbindings.orlmodules/Runtime/Modules/RGBAColorMask.orlsource (orels feel free to steal and adapt lol)

Rionquosue commented 3 months ago

I'll give that a try later, that looks nice and clean. I also see you have some audiolink pathing stuff in that repo, which interests me a lot as another thing I'd like to see hit the main shader some time! Thanks for coming out of the blue with this, and love your Avatar work too.

orels1 commented 3 months ago

There is also, technically, a MaskedTweaks module available in the generator's current dev versions. Its just not included in any built-in shader. It allows you to tint and adjust smoothness via a mask

https://github.com/orels1/orels-Unity-Shaders/blob/dev/Packages/sh.orels.shaders.generator/Runtime/Sources/Modules/MaskedTweaks.orlsource