Garry's Mod Wiki

DynamicMaterial

  IMaterial DynamicMaterial( string materialPath, string flags = nil )

Description

Creates a dynamic Material from the given materialPath

This function should never be used in a Rendering Hook because it creates a new dynamic material every time and can fill up your vram.

Arguments

1 string materialPath
The material with path. The path is relative to the materials/ folder.
2 string flags = nil
Some bind of bits / byte.
What does this argument do / use.

Currently working value: "0100010" --nocull smooth

Returns

1 IMaterial
Generated material.