chris1384 Posted November 12, 2017 Share Posted November 12, 2017 Hi there! For a while I have this strange issue with my taillights shader. I tried using a different texture but it seems it doesn't show up (it's black) and it stays like that even if the taillights resource is restarted or stopped. Is there a way I could fix it? Thanks. Clientside addEventHandler("onClientResourceStart", resourceRoot, function() local shader1 = dxCreateShader("texreplace.fx") local lightsoff = dxCreateTexture("vehiclelights128.png") engineApplyShaderToWorldTexture(shader1,"vehiclelights128") dxSetShaderValue(shader1, "gTexture", "vehiclelights128") local shader2 = dxCreateShader("texreplace.fx") local lightson = dxCreateTexture("vehiclelightson128.png") engineApplyShaderToWorldTexture(shader2,"vehiclelightson128") dxSetShaderValue(shader2, "gTexture", lightson) end) Shader texture gTexture; technique TexReplace { pass P0 { Texture[0] = gTexture; } } Link to comment
Dzsozi (h03) Posted November 12, 2017 Share Posted November 12, 2017 addEventHandler("onClientResourceStart", resourceRoot, function() local shader1 = dxCreateShader("texreplace.fx") local lightsoff = dxCreateTexture("vehiclelights128.png") engineApplyShaderToWorldTexture(shader1,"vehiclelights128") dxSetShaderValue(shader1, "gTexture", lightsoff) local shader2 = dxCreateShader("texreplace.fx") local lightson = dxCreateTexture("vehiclelightson128.png") engineApplyShaderToWorldTexture(shader2,"vehiclelightson128") dxSetShaderValue(shader2, "gTexture", lightson) end) Try this and make sure that the paths for the textures in the script are correct. Also, did you add the textures in the meta file? What does the debugscript say? Link to comment
chris1384 Posted November 12, 2017 Author Share Posted November 12, 2017 Yes I added the textures to meta, also the debugscript shows nothing. Maybe it has to do with the modded vehicles but I'm not sure.. Link to comment
Dzsozi (h03) Posted November 12, 2017 Share Posted November 12, 2017 Check the modded vehicle's txd file if it has any light textures and replace them as well. Link to comment
Captain Cody Posted November 13, 2017 Share Posted November 13, 2017 If the modded vehicles txd has any light files delete them, having vehiclelightson128/vehiclelights128.png in a vehicles txd file will cause it go black. 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