Rottey Posted June 7, 2020 Share Posted June 7, 2020 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) Spoiler 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... 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