Loading video...
Video Failed to Load
Realized I can hijack my custom shader models rimlight input to shadowmask whatever I want. Previously was just inputting a single value for "rimlight intensity" across the entire model, and realized I could use a TEXTURE for an input ... gunna use this to better mask glitters!!!
11,729 views • 2 years ago •via X (Twitter)
10 Comments

For some reason I didn't realize I could just send different values per pixel with that input. And realizing this allowed me to 1) do the rimlight calc in material (so now exposed with params to change it!) and ALSO push in any other kind of data with it, like a sparkle mask 👀

One issue I was having with sparkles is they were not being masked out in shadow properly, environment reflections were still making them sparkle a bit and it just looked odd like for example here:

This is with them shadowmasked, looks much better imo

(although the sparkles still need some work...)

After a bit more work, I'm not really happy with the way the sparkles (don't) glow with bloom unless the underlying surface colour is bright. I think I can fix this by being able to pass in a float3 instead of just a float for the rimlight, so it gets colour with it and I don't..

have to use the diffuse colour to determine the rimlight colour at all, I can just use whatever colour I push in instead, and that way I can put white sparkles on a black mesh and they stay bright maybe?

More better maybe

Sparkles now actually bloom much nicer! Can't be coloured sparkles though.... soooo wondering if it's worth it to use 3 custom float channels to get that, instead of just using 1 for greyscale sparkles HMMMM

Do those wires look like this because of some plugin?

Yes, Electronic Nodes!
