3B00DG4MER Posted April 25, 2014 Posted April 25, 2014 Hello,i want to make BackGround Shader but it's won't work it's show black screen local screenWidth, screenHeight = guiGetScreenSize() local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight) addEventHandler( "onClientRender", root, function() if myShader then dxSetShaderValue(myShader, "ScreenSource", myScreenSource) dxDrawImage(0, 0, screenWidth, screenHeight, myShader) end end ) -- Use 'toggle' command to switch shader on and off myShader, toonTec = dxCreateShader("blur.fx") addCommandHandler( "toggle", function() if not myShader then myShader = dxCreateShader( "blur.fx" ) -- Create shader else destroyElement( myShader ) -- Destroy shader myShader = nil end end ) SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
Ab-47 Posted April 25, 2014 Posted April 25, 2014 Have you got any settings for your shader? Like; Settings = {} Settings.var = {} Settings.var.bloom = 1.5 Settings.var.blendR = 355 Settings.var.blendG = 355 Settings.var.blendB = 355 Settings.var.blendA = 100 I forgot who the author is buh yea, add this to your code replacing line 8: local col = tocolor(Settings.var.blendR, Settings.var.blendG, Settings.var.blendB, Settings.var.blendA) dxDrawImage( 0, 0, screenWidth, screenHeight, myShader, 0,0,0, col) And now Aurora is back again, pm for more info. Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA. Ex. Developer at Community of Social Gamers - CSG Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP Ab-47
3B00DG4MER Posted April 25, 2014 Author Posted April 25, 2014 Have you got any settings for your shader?Like; Settings = {} Settings.var = {} Settings.var.bloom = 1.5 Settings.var.blendR = 355 Settings.var.blendG = 355 Settings.var.blendB = 355 Settings.var.blendA = 100 I forgot who the author is buh yea, add this to your code replacing line 8: local col = tocolor(Settings.var.blendR, Settings.var.blendG, Settings.var.blendB, Settings.var.blendA) dxDrawImage( 0, 0, screenWidth, screenHeight, myShader, 0,0,0, col) won't work if you have background blur script can you give me it plz ? SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
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