ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. engineRemoveShaderFromWorldTexture

Function

engineRemoveShaderFromWorldTexture

ClientShadersIdentical to MTA:SA

Removes a texture replacement made with engineApplyShaderToWorldTexture - you must pass the same name pattern and the same element. The original game texture comes back.

Syntax

bool engineRemoveShaderFromWorldTexture(element theShader, string textureName [, element targetElement = nil])

Arguments

theShaderelement
The shader.
textureNamestring
The same name pattern.
targetElementelement, optional = nil
The same element.

Returns

true when removed; false when there was no such replacement.

Example

local shader = dxCreateShader("texture gTexture; technique t { pass P0 { Texture[0] = gTexture; } }")
dxSetShaderValue(shader, "gTexture", dxCreateTexture("sign.png"))
engineApplyShaderToWorldTexture(shader, "heat_02")
setTimer(function() engineRemoveShaderFromWorldTexture(shader, "heat_02") end, 30000, 1)

See also