Garry's Mod Wiki

Garry's Mod Wiki

  IMaterial:SetTexture( string materialTexture, ITexture texture )

Description

Sets the specified material texture to the specified texture, does nothing on a type mismatch.

Arguments

1 string materialTexture
The name of the keyvalue on the material to store the texture on.
2 ITexture texture
The new texture. This can also be a string, the name of the new texture.

Example

Example usage of this function.

local blur_mat = Material( "pp/bokehblur" ) blur_mat:SetTexture( "$basetexture", render.GetScreenEffectTexture() )

Example

Equivalent of Example 1, demonstrating the use of a texture's name.

local blur_mat = Material( "pp/bokehblur" ) blur_mat:SetTexture( "$basetexture", "_rt_fullframefb" )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...