Garry's Mod Wiki


  IMaterial DynamicMaterial( string materialPath, string flags = nil )


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.


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


1 IMaterial
Generated material.