Jump to content

Shader reset original texture ?


Recommended Posts

Posted

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) 

Posted

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) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...