Paul Thomas Posted December 23, 2009 Share Posted December 23, 2009 File Name: Radial Blur and Radial Masked Blur File Submitter: Eternal Crisis File Submitted: 23 Dec 2009 File Category: Materials Resolution: 512x512 Free for use with any Leadwerks Engine game or project. Directions for Framewerk with engine version 2.8: Field filter_radialblur:TShader Field filter_radialmaskedblur:TShader Field radialblur_enabled:Int = False Field radialblur_blur:Float = 0.0070 Field radialmaskedblur_enabled:Int = False Field radialmaskedblur_mask:TTexture Field radialmaskedblur_opacity:Float = 1.0 Field radialmaskedblur_blur:Float = 0.0075 Within the Draw method: If radialblur_enabled DrawEffectRadialBlur(postbuffer[1-cb].colorbuffer[0]) EndIf If radialmaskedblur_enabled DrawEffectRadialMaskedBlur(postbuffer[1-cb].colorbuffer[0]) EndIf The methods: Method DrawEffectRadialBlur(colortexture:TTexture) If Not filter_radialblur filter_radialblur = LoadShader("abstract::radialblur.vert","abstract::radialmaskedblur.frag") SetShader(filter_radialblur) SetShaderFloat(filter_radialblur, "blur", radialblur_blur) colortexture.bind(0) DrawFlippedImage(colortexture) EndMethod Method DrawEffectRadialMaskedBlur(colortexture:TTexture) If Not filter_radialmaskedblur filter_radialmaskedblur = LoadShader("abstract::radialmaskedblur.vert","abstract::radialmaskedblur.frag") If Not radialmaskedblur_mask radialmaskedblur_mask = LoadTexture("abstract::radialmask_full.dds") SetShader(filter_radialmaskedblur) SetShaderFloat(filter_radialmaskedblur, "opacity", radialmaskedblur_opacity) SetShaderFloat(filter_radialmaskedblur, "blur", radialmaskedblur_blur) colortexture.bind(0) radialmaskedblur_mask.bind(1) DrawFlippedImage(colortexture) EndMethod This effect doesn't play nicely while submerged, so it's best to disable the effect when you're submerged, and turn it back on (if it was on when going submerged) when you're no longer submerged. For the radialmaskedblur you can change the radialmaskedblur_mask texture to use different effects. The zip file provides six different textures that will provide the blur within specific locations. Feel free to play around with them and/or make your own. If anyone makes any improvements to the shader or improvements with the shader in combination with framewerk, please let me know. Click here to download this file 1 Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted December 24, 2009 Share Posted December 24, 2009 Excellent, Thanks EC most generous of you, much appreciated. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Paul Thomas Posted December 24, 2009 Author Share Posted December 24, 2009 Not a problem them. This effect is seen in most games, such as Crysis and Far Cry 2. Can be used for multiple types of situations. 1 Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted December 24, 2009 Share Posted December 24, 2009 Not a problem them. This effect is seen in most games, such as Crysis and Far Cry 2. Can be used for multiple types of situations. I most definately have a use for this, I was following your shader work on the old forum and on your Blog, all very impressive. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Paul Thomas Posted December 24, 2009 Author Share Posted December 24, 2009 Thanks man I'll be releasing more shaders once I finish them. I have a lot more work in the post-processing area just for my own project but I'll be sharing most of them. I think the next shader I'll be working on is water/rain screen splats. Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted December 24, 2009 Share Posted December 24, 2009 Thanks man I'll be releasing more shaders once I finish them. I have a lot more work in the post-processing area just for my own project but I'll be sharing most of them. I think the next shader I'll be working on is water/rain screen splats. Wasn't hnphan doing some work on raindrops .. splats .. water things ? I seem to recall a purple based screenie with oil drums but can't remember much more than that. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Paul Thomas Posted December 24, 2009 Author Share Posted December 24, 2009 Yeah. Several months ago I asked if I could get the source to it but he said he was too busy at the time. I then continued my conversion from HLSL to GLSL learning curve, lol. Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted December 24, 2009 Share Posted December 24, 2009 Yeah. Several months ago I asked if I could get the source to it but he said he was too busy at the time. I then continued my conversion from HLSL to GLSL learning curve, lol. lol .. I found the thread ... I was right purple and oildrums certainly an effect worth having. I look forward to your work in this area. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Paul Thomas Posted December 24, 2009 Author Share Posted December 24, 2009 Yeah, I think it'll be fun, and I plan to animate the rain/blood. We'll see how it goes but I think it'll be a fun project. Quote Link to comment Share on other sites More sharing options...
wailingmonkey Posted December 25, 2009 Share Posted December 25, 2009 thanks for generously sharing your work on these, Eternal Crisis. Quote Vista Ultimate SP1 64bit | Q6600 2.40 GHZ | 8GB RAM | 320MB Nvidia 8800GTS Link to comment Share on other sites More sharing options...
TylerH Posted December 25, 2009 Share Posted December 25, 2009 The code to his shaders for the chromatic dispersion is included in the HNPHAN folder in every single Leadwerks distro. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.