3 Months Ago
Introduce Material.Set so you can change all attributes within a material or shader This allows you to create materials completely in C# Add Color Update comments Merge pull request #606 from Facepunch/proceedural-materials ```cs public static void SetupCustomMaterial(ModelEntity myModel) { Material m = Material.Create( "my_cool_material", "simple" ); m.Set( "g_vColorTint", Color.Red ); m.Set( "g_flMetalness", 1.0f ); m.Set( "Color", Texture.White ); m.Set( "Roughness", Texture.White ); m.Set( "Normal", Texture.Transparent ); myModel.SetMaterialOverride( m ); } ``` https://files.facepunch.com/ognik/1b0511b1/199966083-b7e9a595-98b3-4e9d-8cc0-b5850db444f8.png