Loading video...

Video Failed to Load

Go Home

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

Dylan Meville's profile picture
Dylan Meville2 years ago

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 👀

Dylan Meville's profile picture
Dylan Meville2 years ago

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:

Dylan Meville's profile picture
Dylan Meville2 years ago

This is with them shadowmasked, looks much better imo

Dylan Meville's profile picture
Dylan Meville2 years ago

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

Dylan Meville's profile picture
Dylan Meville2 years ago

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..

Dylan Meville's profile picture
Dylan Meville2 years ago

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?

Dylan Meville's profile picture
Dylan Meville2 years ago

More better maybe

Dylan Meville's profile picture
Dylan Meville2 years ago

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

Vlad Kostin's profile picture
Vlad Kostin2 years ago

Do those wires look like this because of some plugin?

Dylan Meville's profile picture
Dylan Meville2 years ago

Yes, Electronic Nodes!

Related Videos

I asked Garry Tan how to use meta prompting to get better at AI: "My partners at YC Jared Friedman and Pete Koomen showed me how to do this. You can take almost anything that you do all the time and just drop it into a context window. And then say, “Here’s a bunch of inputs and outputs." And maybe you also add a bunch of notes. And then you tell it, “Write me a prompt that can act as an agent that takes this input and makes this output over here.” You can do this for almost any type of knowledge work. And you can even introspect. "What are things you notice that I did to convert this from the input to the output?”. And then you can just start using the prompt. Initially, it’s going to suck. Because it’s just not that smart yet. But what’s funny is now, I also use it to Iterate my writing. You can be very direct, "I would never say that", "Don’t say it like this", or "Oh, you used the long word there, use the short word". Just speak to it conversationally. And then when you're happy with the output, you can use that new output to make a new prompt. "Based on this conversation, give me a better initial prompt that incorporates all the things we talked about." And you can do this with literally everything. And in theory, there’s so much it applies to that people do day-to-day. You could use it for tweets. You could use it for editing podcasts. You can use it for pretty much everything. I have a folder of prompts that I use all the time. My YouTube prompt is on v27 or something. I'll go through this process with all the different max models. I'll use GPT 5.2 Pro. I’ll use Grok. I'll use Claude. Then, I’ll take all the outputs from all the models and put them into Claude and say "Here’s my prompt, here’s the output from four LLMs, including yourself. Rate each response and tell me what the pros and cons of each approach are." And I usually say "give it to me in numbered form". And then you can agree with one, disagree with two, tell it three is this or that. And then after that, you say given all of this, synthesize it."

The Peel

51,632 views • 4 months ago