ParaToxic Posted October 20, 2012 Share Posted October 20, 2012 Hei today I had some time to implement a lens flare effect to the engine. Now it supports Halos, ghost features, chromatic disperation and a lensdirt texture. I uploaded a video, but I have to say, that the contrast is very low and you can't really see the effect ( let's say not so good ). I have a problem to implement it in the framework, because it needs multiple passes : -Downsample + Threshold ( the threshold has to be adjusted for the sky brightness ) -Add the Lens flare features -Blur the Image -Multiply the resulted image with a lensdirt texture like in BF3 used and blend this with the original rendered image---> Finished I know you can pack some steps together , like the 2nd, 3rd step, but then I need to make 3 passes. Maybe somebody can tell me how to add that to the framework... Here is the video: http://www.youtube.com/watch?v=pQb_EAnsp3w I hope you like it 3 Quote Link to comment Share on other sites More sharing options...
flachdrache Posted October 20, 2012 Share Posted October 20, 2012 You might dont have a idea how awfull that sounds - at first glance it makes me think that you copy some shader code from a random game and are trying to add it to your game ... the way they implemented it in there game ... thats quit confusing, not very much legal and aint getting you there. I most likely would use something like the day/night script shader, load the lense textures + a sun flare, draw the sun flare at the sunPos, get a vector from the screen center to the sunflare and draw the lenses depending on that - then fade the lense texture alpha to full alpha ,if looking at the sunflare ... i dont see a reason to filter these flares however, since the god rays will eat them away and the textures used should be good enough in the first place. Quote AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3 zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5 Xxploration FPS in progress ... Link to comment Share on other sites More sharing options...
Pixel Perfect Posted October 20, 2012 Share Posted October 20, 2012 Actually, I really like that ParaToxic, it looks very subtle! Can't help you really with the integration into the framework other than using framewerk (where you have the code at your disposal and access to all the buffers). The problem with framewerk is it's not been kept up to data so lacks some of the current features. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
ParaToxic Posted October 20, 2012 Author Share Posted October 20, 2012 First that isn't stolen. There is a realy cool guy, I contact him throug e-mail and asked how he has made this lens flare effect in his video.Then he showed me his idea and I made it similar like he. You can't see it on the video very good because of the contrast and the unoptimized values inside the shaders.But now I'm trying to do it better and the result is better than the video. Quote Link to comment Share on other sites More sharing options...
ParaToxic Posted October 20, 2012 Author Share Posted October 20, 2012 I added a first version for the framework to the asset store Quote Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted October 21, 2012 Share Posted October 21, 2012 very verrrrry niice... and THANKS --Mike Quote Link to comment Share on other sites More sharing options...
niv3k Posted October 22, 2012 Share Posted October 22, 2012 cool. don't make a bf3 lens flare...or at least don't have it take up half the screen like they made theirs to. makes games annoying to play. Quote Link to comment Share on other sites More sharing options...
LEFans Posted October 23, 2012 Share Posted October 23, 2012 Abnormal exit. Error: Failed to compile fragment shader object. 0(29) : error C7532: global function texture requires "#version 130" or later Source: #version 120 #define LW_MAX_PASS_SIZE 64 #define LW_INSTANCED #define LW_SM4 varying vec4 fragcolor; varying vec4 fragcoord; uniform sampler2D texture0; //color uniform float apptime; uniform vec2 buffersize; Quote AMD3600+/2GB DDR3 SDRAM / GeForce 8600 GTS I3 530/2GB DDR3/GF GT240 DDR5 Link to comment Share on other sites More sharing options...
ParaToxic Posted October 23, 2012 Author Share Posted October 23, 2012 Oh jes sry for the error I will change it in a new version.I have the feeling, that nobody get it worked in their Editor ? Would be cool to hear something about the result, because I can't test it on an other PC Quote Link to comment Share on other sites More sharing options...
niv3k Posted November 11, 2012 Share Posted November 11, 2012 anymore updates? Quote Link to comment Share on other sites More sharing options...
ParaToxic Posted November 12, 2012 Author Share Posted November 12, 2012 Sry not yet, haven't got so much time now....school :/ But I will try to do that when I have some time Quote 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.