FuriouZ Posted May 2, 2015 Posted May 2, 2015 Hello! Is there any way to reset a shader texture to a original one without stopping a resource ? I wan't do to that if i enter to a specific area, then i have a custom texture, if i leave from that area, the custom texture will be removed and the original one will be back ? code addEventHandler("onClientRender", root, function() local zone = getZoneName (getElementPosition(getLocalPlayer())) if zone == "Santa Maria Beach" then dxSetShaderValue(textBeachsandShad,"gTexture",beachSand) engineApplyShaderToWorldTexture(textBeachsandShad,"grass_128hv") else --How to reset original texture?? end end)
Walid Posted May 2, 2015 Posted May 2, 2015 Yes you can. engineRemoveShaderFromWorldTexture () Your code addEventHandler("onClientRender", root, function() local zone = getZoneName (getElementPosition(getLocalPlayer())) if zone == "Santa Maria Beach" then dxSetShaderValue(textBeachsandShad,"gTexture",beachSand) engineApplyShaderToWorldTexture(textBeachsandShad,"grass_128hv") else engineRemoveShaderFromWorldTexture(textBeachsandShad,"grass_128hv") end end)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now