Mefisto_PL Posted July 3, 2013 Share Posted July 3, 2013 Hello.. I have a small question. How I can set for this, effect which simulate drawing it? function openPanel( cmd ) if ( display == true ) then removeEventHandler( "onClientPreRender", root, createBlurShader ) blurShader, blurTec = nil display = false else blurShader, blurTec = dxCreateShader( "shaders/BlurShader.fx" ) addEventHandler( "onClientPreRender", root, createBlurShader ) display = true end end addCommandHandler( "panel", openPanel ) function createBlurShader() if ( blurShader ) then dxUpdateScreenSource( myScreenSource ) dxSetShaderValue( blurShader, "ScreenSource", myScreenSource ); dxSetShaderValue( blurShader, "BlurStrength", blurStrength ); dxSetShaderValue( blurShader, "UVSize", sx, sy ); dxDrawImage( 0, 0, sx, sy, blurShader ) dxDrawImage( 0, 0, sx, sy, "images/blank.png", 0, 0, 0, tocolor( 0, 0, 0, 150 ), false ) end end Link to comment
Dealman Posted July 3, 2013 Share Posted July 3, 2013 Do you mean interpolateBetween to make it look like it's drawing your DXWindow? Or do you mean a way to preview shaders or something? Link to comment
Mefisto_PL Posted July 3, 2013 Author Share Posted July 3, 2013 Drawing dxWindow and shader effect. Link to comment
Dealman Posted July 3, 2013 Share Posted July 3, 2013 So do you want to draw the Shader onto a DX Window like a preview? Or do you just want to be able to toggle the shader on/off through a DX Window or what? It would be easier to help if you explained what you actually want to do 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