Where can I find a copy of the default spatial shader?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By KoukouStudios

Hello,

I need to figure out a way to multiply the vertex color as defined into a model in Blender. As far as I can tell it is not possible using the default spatial material and I don’t feel like rewriting the entire thing from scratch so where can I find the shader to edit it or better make a copy just to add the functionality I’m interested in?

Cheers.

:bust_in_silhouette: Reply From: omggomb

Configure you SpatialMaterial the way you want it (the features you need) then in the slot where your material is assigned, click the dropdown and select “Convert to ShaderMaterial”. If you don’t configure it first, you’ll only get the basic shader code (without normal mapping for example).

As an aside: You can use the vertex color with SpatialMaterial, look for Vertex Color → Use As Albedo. This does multiply with Albedo Color and Albedo Texture. But maybe you’re looking for something different?

That’s great thank you for the info. I tried the “Use as albedo” setting before getting into shaders btw but it wasn’t working. Maybe I’m doing something wrong with the export from Blender though. Good to know this. Thanks!

KoukouStudios | 2020-03-04 13:25