Vazern Posted December 11, 2018 Share Posted December 11, 2018 Hello guys! I started with shaders today, I made a script to apply a texture to the weapons fire, but it is not working, nor does it give any error in the debug. Client-side shader = dxCreateShader("shader/shader.fx") fire_fx = dxCreateTexture("files/fire.png") function replaceFireFX() engineApplyShaderToWorldTexture(shader, "muzzle_texture4") dxSetShaderValue(shader, "gTexture", fire_fx) end addEventHandler("onClientResourceStart", resourceRoot, replaceFireFX) addEventHandler("onClientPlayerJoin", root, replaceFireFX) FX-Code texture gTexture; technique TexReplace { pass P0 { Texture[0] = gTexture; } } fire.png Link to comment
Moderators IIYAMA Posted December 11, 2018 Moderators Share Posted December 11, 2018 I also tried that world texture once and for some unknown reason it doesn't work. A shader specialist might know. 1 Link to comment
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