Creating a custom Substrate Shader Model/BSDF

This is awesome work—thanks for documenting it so thoroughly :raising_hands: Substrate custom BSDFs are still pretty uncharted territory, so having a running journal like this is super valuable.

Your approach of first hard-coding changes in SubstrateEvaluation.ush makes a lot of sense, especially to map out where the lighting logic actually lives before plumbing in custom pins. The toon diffuse via stepping NoL, shadow-masked rim light, and ramped specular are exactly the kinds of things Substrate should make possible, but examples are definitely scarce.

I haven’t finished a full custom Substrate BSDF yet, but I’ve poked around the same areas you mention. From what I’ve seen, after adding the custom pin in UMaterialExpressionSubstrateSlabBSDF, the tricky part is tracking how that input gets serialized into the Substrate material payload and then accessed during BSDF evaluation (via the generated HLSL structs). Watching how existing inputs like roughness or F0 are threaded through is usually the best breadcrumb trail.

Really appreciate you sharing the code snippets and the repo—this will save others a ton of time. I’ll keep an eye on the GitHub fork, and if I uncover anything useful on custom pin data flow or specular handling in Substrate, I’ll report back. Two (or more) heads definitely better than one here :slightly_smiling_face: