# Creating a custom Substrate Shader Model/BSDF

**URL:** <https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046>\
**Category:** Asset Creation\
**Tags:** unreal-engine, question\
**Created:** [March 26, 2024, 1:48pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046 "2024-03-26T13:48:49Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![DMeville](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmeville/32/759347_2.png) [@DMeville](https://forums.unrealengine.com/u/DMeville)\
**Post date:** [August 11, 2024, 8:07pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/21 "2024-08-11T20:07:50Z")

</div>

No problem. Honestly, I wouldn’t hold my breath though. I’ve been waiting for a very long time for them to add something that would make it easier, and it is unlikely to ever happen tbh. Why I took matters into my own hands finally 😆

---

<div class="post-metadata">

**Author:** ![RayoLegosi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RayoLegosi](https://forums.unrealengine.com/u/RayoLegosi)\
**Post date:** [October 13, 2024, 8:54pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/22 "2024-10-13T20:54:41Z")

</div>

Nice work! I compiled the code however I can’t seem to find the pin for the rimlight.

---

<div class="post-metadata">

**Author:** ![DMeville](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmeville/32/759347_2.png) [@DMeville](https://forums.unrealengine.com/u/DMeville)\
**Post date:** [October 14, 2024, 1:05am UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/23 "2024-10-14T01:05:10Z")

</div>

In the most recent versions on github I’ve removed the “rimlight” pin and replaced it with three pins for “Masked Color”. Whatever you plug into these will be applied in the same way the rimlight was – letting you plug in an extra 'fake lighting term that is masked by the object shadows properly".

Doing it this way exposes these pins for additional uses, like fake snow sparkles/glints that are properly masked by cast shadows!

 ![UnrealEditor_0rvRzDd4zv](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/b/0bbbf6dad87372af533c81d5888a7c086a8352b7.jpeg)

---

<div class="post-metadata">

**Author:** ![RayoLegosi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RayoLegosi](https://forums.unrealengine.com/u/RayoLegosi)\
**Post date:** [October 14, 2024, 6:08pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/24 "2024-10-14T18:08:33Z")

</div>

Thanks for the explanation!

---

<div class="post-metadata">

**Author:** ![BigPotato1942](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BigPotato1942](https://forums.unrealengine.com/u/BigPotato1942)\
**Post date:** [February 7, 2025, 1:08am UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/25 "2025-02-07T01:08:23Z")

</div>

@DMeville This is the best thread on rendering stuff I’ve seen, and I’m trying to do the same thing. But your github repo is gone! Any chance it was just relocated somewhere you can link?

---

<div class="post-metadata">

**Author:** ![DMeville](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmeville/32/759347_2.png) [@DMeville](https://forums.unrealengine.com/u/DMeville)\
**Post date:** [February 9, 2025, 12:07am UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/26 "2025-02-09T00:07:02Z")

</div>

Thanks! The github is still there, but since it is a fork of the Unreal Engine source, it is only viewable if your account has been accepted into the Epic Games organization. You can view the instructions on how to get access here: [Downloading Unreal Engine Source Code | Unreal Engine 5.5 Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/unreal-engine/downloading-unreal-engine-source-code)

Once you have access to the Unreal Engine github, you should be able to view my fork that is linked in this thread too 🙂

---

<div class="post-metadata">

**Author:** ![DMeville](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmeville/32/759347_2.png) [@DMeville](https://forums.unrealengine.com/u/DMeville)\
**Post date:** [November 19, 2025, 7:24pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/27 "2025-11-19T19:24:19Z")

</div>

Working on porting these changes to 5.7, struggling as some things have changed with how the data is stored/loaded from the substrate buffer that is giving me these out of memory errors that I’m trying to work through why and what needs to change.

EDIT: Actually I think this error is not from packing/unpacking, but from trying to assign that unpacked data into an invalided memory address (the SLAB\_CUSTOM0() VGPRs not being defined properly?). HmmmmmMMMMMM

 ![UnrealEditor_cM9KrFUvYW](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/7/9d7c4a25bc98d777b93b2c018674c44c77a2b24f.png)

Also I saw that there’s an official toon bsdf now as of yesterday! [https://github.com/EpicGames/UnrealEngine/commit/9d8e641d2d249fa5cc0a46bdd3c2b32e6f7b1fb0#diff-68d2fa1bded577940d9244fac4fbfe83e1da82e323e3844771b3ccc94c04ae5fR43](https://github.com/EpicGames/UnrealEngine/commit/9d8e641d2d249fa5cc0a46bdd3c2b32e6f7b1fb0#diff-68d2fa1bded577940d9244fac4fbfe83e1da82e323e3844771b3ccc94c04ae5fR43)

---

<div class="post-metadata">

**Author:** ![Fantom\_Adventure](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fantom\_Adventure](https://forums.unrealengine.com/u/Fantom_Adventure)\
**Post date:** [November 20, 2025, 4:51am UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/28 "2025-11-20T04:51:03Z")

</div>

I’m really curious on how well does subtrate works as default for stylized work. I really want to make my own stylized painting game.

---

<div class="post-metadata">

**Author:** ![DMeville](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmeville/32/759347_2.png) [@DMeville](https://forums.unrealengine.com/u/DMeville)\
**Post date:** [November 20, 2025, 6:32pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/29 "2025-11-20T18:32:04Z")

</div>

Depends on what you mean, but probably fine. It shouldn’t really be any different than non-substrate rendering. You can still use most of the tricks you could use if not using substrate (like overlay materials to do toon lighting, post processes, etc).

Maybe one downside would be since substrate is newer there’s less tutorials/documentation around it (which is why I’m writing this thread :P)

---

<div class="post-metadata">

**Author:** ![DMeville](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmeville/32/759347_2.png) [@DMeville](https://forums.unrealengine.com/u/DMeville)\
**Post date:** [November 20, 2025, 9:47pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/30 "2025-11-20T21:47:55Z")

</div>

Getting somewhere…

Git commit here showing the changes to get a single custom pin working through substrate in 5.7. Updating to UE5-main now though to see the Substrate Toon BSDF, as I might want to base my custom slab off of that instead for my personal project. (and at the very least it’s another exmaple on how to make an entirely custom slab)

[https://github.com/EpicGames/UnrealEngine/commit/e5adc9c556b8053555cc2bb90d3c0216e830efff](https://github.com/DMeville/UnrealEngine-Custom-Substrate/commit/e5adc9c556b8053555cc2bb90d3c0216e830efff)

---

<div class="post-metadata">

**Author:** ![DMeville](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmeville/32/759347_2.png) [@DMeville](https://forums.unrealengine.com/u/DMeville)\
**Post date:** [November 22, 2025, 1:46am UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/31 "2025-11-22T01:46:37Z")

</div>

All working in UE5-main now! Have the shadow sharpness pin, masked rgb pins to make a rimlight that only appears in non-shadowed areas (or whatever you hook up to those pins) and a glittermask for the Single Layer Water for those extra sparkles: [https://github.com/DMeville/UnrealEngine-Custom-Substrate/commit/8c5f216d9abd850c7c0483ea91be746067c68ef3](https://github.com/DMeville/UnrealEngine-Custom-Substrate/commit/8c5f216d9abd850c7c0483ea91be746067c68ef3)

---

<div class="post-metadata">

**Author:** ![Fantom\_Adventure](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fantom\_Adventure](https://forums.unrealengine.com/u/Fantom_Adventure)\
**Post date:** [November 23, 2025, 10:05pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/32 "2025-11-23T22:05:00Z")

</div>

Yeah that makes a lot of sense. the idea is taking painted meshes and having the light react to it like if it were photoshop with different blending modes to help cement the look of it being painted rather than using PBR rendering. and so far what you have is really promising!

---

<div class="post-metadata">

**Author:** ![Fantom\_Adventure](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fantom\_Adventure](https://forums.unrealengine.com/u/Fantom_Adventure)\
**Post date:** [November 25, 2025, 9:51pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/33 "2025-11-25T21:51:29Z")

</div>

oh the link does not work

---

<div class="post-metadata">

**Author:** ![DMeville](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmeville/32/759347_2.png) [@DMeville](https://forums.unrealengine.com/u/DMeville)\
**Post date:** [November 26, 2025, 6:19am UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/34 "2025-11-26T06:19:46Z")

</div>

> [@Creating a custom Substrate Shader Model/BSDF](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/26):
>
> Thanks! The github is still there, but since it is a fork of the Unreal Engine source, it is only viewable if your account has been accepted into the Epic Games organization. You can view the instructions on how to get access here: [Downloading Unreal Engine Source Code | Unreal Engine 5.5 Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/unreal-engine/downloading-unreal-engine-source-code) Once you have access to the Unreal Engine github, you should be able to view my fork that is linked in this thread too slight_smile

---

<div class="post-metadata">

**Author:** ![HQScanline](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HQScanline](https://forums.unrealengine.com/u/HQScanline)\
**Post date:** [December 12, 2025, 4:41pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/35 "2025-12-12T16:41:39Z")

</div>

How many custom pins can you add to substrate and can some be vectors?

---

<div class="post-metadata">

**Author:** ![DMeville](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dmeville/32/759347_2.png) [@DMeville](https://forums.unrealengine.com/u/DMeville)\
**Post date:** [December 13, 2025, 5:48pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/36 "2025-12-13T17:48:14Z")

</div>

As many as you want, I suppose. But it’s not free performance wise, It costs extra bytes per pixel for every extra pin!

Yes the pins can be float1/2/3/4. I just made them all float1’s for simplicity sake

---

<div class="post-metadata">

**Author:** ![VisualChris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visualchris/32/989290_2.png) [@VisualChris](https://forums.unrealengine.com/u/VisualChris)\
**Post date:** [December 18, 2025, 11:29am UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/37 "2025-12-18T11:29:05Z")

</div>

This is such a gem, thank you!

---

<div class="post-metadata">

**Author:** ![HQScanline](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HQScanline](https://forums.unrealengine.com/u/HQScanline)\
**Post date:** [January 2, 2026, 9:00pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/38 "2026-01-02T21:00:48Z")

</div>

Much more flexible than Default Shading Models.

---

<div class="post-metadata">

**Author:** ![blendgameue](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@blendgameue](https://forums.unrealengine.com/u/blendgameue)\
**Post date:** [January 18, 2026, 2:30pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/39 "2026-01-18T14:30:13Z")

</div>

I cloned the main branch and tried building it, but I can’t see the Toon Shading model.I’m pretty sure I saw a commit related to it in the Epic repo, though. I’m currently checking the code.

Appreciate you sharing this — really helpful.

---

<div class="post-metadata">

**Author:** ![blendgameue](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@blendgameue](https://forums.unrealengine.com/u/blendgameue)\
**Post date:** [January 18, 2026, 2:31pm UTC](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046/40 "2026-01-18T14:31:54Z")

</div>

![화면 캡처 2026-01-18 232334](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/b/1db59489fd0a05b65684ab11060ef949b583cd4b.jpeg)

it’s working after adding the front material node—thank you.

[Previous page](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046.md?page=1)

[Next page](https://forums.unrealengine.com/t/creating-a-custom-substrate-shader-model-bsdf/1773046.md?page=3)
