Gravestone Posted July 27, 2016 Posted July 27, 2016 (edited) I'm using this code to create/remove water shader. The shader is created successfully but the problem is in removing it. The second function removes it. No errors in the debug. Edited August 14, 2016 by Guest
Hale Posted July 27, 2016 Posted July 27, 2016 myShader, tec = dxCreateShader ( "water.fx" ) function applyWaterShader() local textureVol = dxCreateTexture ( "images/smallnoise3d.dds" ); local textureCube = dxCreateTexture ( "images/cube_env256.dds" ); dxSetShaderValue ( myShader, "sRandomTexture", textureVol ); dxSetShaderValue ( myShader, "sReflectionTexture", textureCube ); engineApplyShaderToWorldTexture ( myShader, "waterclear256" ) end function removeWaterShader() engineRemoveShaderFromWorldTexture( myShader, "waterclear256" ) end This was my problem before, try that instead.
Gravestone Posted July 27, 2016 Author Posted July 27, 2016 Not working either. That doesn't make any difference since the variable stays global in both cases.
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