Garry's Mod Wiki

IMaterial:GetShader

  string IMaterial:GetShader()

Description

Returns the name of the materials shader.

This function does not work serverside on Linux SRCDS and always returns shader_error.

This bug is fixed on dev beta and in the next update.

Issue Tracker: 3256

Returns

1 string
Name of the currently loaded shader for this material, or shader_error if the material has no loaded shader.

It is not guaranteed to be in any specific capitalization, so case insensitive checks are advised.