engineRemoveShaderFromWorldTexture | Multi Theft Auto: Wiki Skip to content

engineRemoveShaderFromWorldTexture

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function removes a shader from one or more world textures.

OOP Syntax Help! I don't understand this!

  • Method: shader:removeFromWorldTexture(...)

Syntax

bool engineRemoveShaderFromWorldTexture ( element shader, string textureName, [ element targetElement = nil ] )
Required Arguments
  • shader: The shader which is to be removed
  • textureName: The name of the world texture to remove the shader from. It should be exactly the same string as used with engineApplyShaderToWorldTexture when the shader was initially applied.
Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.

  • targetElement (default: nil): The element to remove the shader from. It should be the same element as used with engineApplyShaderToWorldTexture when the shader was initially applied.

Returns

  • bool: value

Returns true if the shader was successfully removed, false otherwise.

Code Examples

shared

This example will remove a previously created shader from the "des_logwall" world texture

engineRemoveShaderFromWorldTexture ( myShader, "des_logwall" )

See Also

Engine Functions
Engine Elements