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;
}
}