Hey! I had a look at your shader and looks cool.
Thx! Was a lot of hours of troubleshooting and dev. Looks much cooler animating with full normal mapped textures, interior parallax "blood and guts" mesh, realtime shadows (!) etc. Just wanted to get something up in case anyone was still looking for options to do this.
Did you know if you change your filter mode on your mask texture to "point" it will get rid of the nasty artifacts around your masks? I'm not sure of any performance implications of changing this option though.
Yes - actually I mentioned this earlier in this thread (also disable mip-mapping). Also, it still needs some work in finding the ideal greyscale values to choose - will come up with an easier system for that.
Is the harsh pixel edges something you're going for stylisticly? The way I was using it in my shader it didn't matter as all the edges were in the padding of my UVs, but I guess in your case it was unavoidable. I'm not sure if there's maybe a way to blur the generated mask so that you can add in some sort of anti-aliasing? I was trying to work this out but didn't find anything.
The harsh edges (if I understand you properly) are because this MUST be a "Cutout" shader. The amount of NPCs the game will have on screen at one time completely prevents the use of Transparent shaders, at least that's the directive i received. Might be able to turn it into a multi-texturelayer instead for most of it, but that will have to be for another project.
Oh and you should upload your example in a Unity Package instead of just zipping the files up, this will ensure that options like disable sRGB persist when you share it.
Good call - I did that with earlier versions, but didn't have the time to spare troubleshooting the package, as it was very very late night / morning already here in Thailand! Also, the team I was working with seems to have an aversion to packaging things up portably, so I was always having to test and troubleshoot the manual workflow. Will send as package next time, and hopefully with some cooler examples - this one i needed to ensure the textures weren't from the assets themselves.