3B00DG4MER Posted April 25, 2014 Share 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 ) Link to comment
Ab-47 Posted April 25, 2014 Share 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) Link to comment
3B00DG4MER Posted April 25, 2014 Author Share 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 ? 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