Hello everyone,
i am trying to tint multiple search lights in a different color.
I successfully managed to tint one searchlight, by applying a shader to its world texture. Then i tried to specify a target element to the engineApplyShaderToWorldTexture function, but this does only work with objects, peds and vehicles. So currently i cannot apply different shaders to different search lights.
local searchLight = createSearchLight(0, 0, 50, 0, 0, 0, 0, 10)
local shader = dxCreateShader("client/shaders/tint-shader.fx", 0, 0, false, "all")
dxSetShaderValue(shader, "red", 1)
dxSetShaderValue(shader, "green", 0)
dxSetShaderValue(shader, "blue", 0)
dxSetShaderValue(shader, "alpha", 1)
engineApplyShaderToWorldTexture(shader, "unnamed")
-- does not work:
engineApplyShaderToWorldTexture(shader, "unnamed", searchLight)
Does anybody know a different way, to tint multiple searchlights?
Or a different way to create colored light beams? I already tryed to use material lines, but they do not look as bright as a search light, so it does not really look like a light beam...