Please use english language
It is currently 25 Sep 2017, 08:09

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Add a lens flare
PostPosted: 28 Aug 2013, 20:30 
Offline

Joined: 06 Jan 2013, 12:01
Posts: 19
I am making my custom, private enb, but i would like to know how to add lens flares.
I used the god rays only enb on skyrim nexus as a start, but i enable bloom and adjusted the camerafx in enbseries.ini, but i still have no lens flares...
Any way to enable this? (not the sunsprite lens flares)


Top
 Profile  
 
 Post subject: Re: Add a lens flare
PostPosted: 29 Aug 2013, 17:37 
Offline
*sensei*
User avatar

Joined: 10 Jun 2012, 12:31
Posts: 420
Location: Sweden
Be sure this is in your enbbloom.fx.

Code:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
   if (LenzParameters.x > 0.00001)    //If this is modified like 10.00001 lenz wont show up
   {
      for (int i = 0; i < 4; i++)
      {
         float2 distfact = (In.txcoord0.xy - 0.5);
         lenzuv.xy = offset[i].x * distfact;
         lenzuv.xy *= pow(2.0 * length(float2(distfact.x * ScreenSize.z, distfact.y)), offset[i].y);
         lenzuv.xy *= offset[i].z;
         lenzuv.xy = 0.5 - lenzuv.xy;
         
         float3 templenz = tex2D(SamplerBloom2, lenzuv.xy);
         templenz = templenz * factors[i];
         distfact = (lenzuv.xy-0.5);
         distfact *= 2.0;
         templenz *= saturate(1.0 - dot(distfact, distfact));//limit by uv 0..1
         
         float maxlenz = max(templenz.x, max(templenz.y, templenz.z));
         float tempnor = (maxlenz / (1.0 + maxlenz));
         tempnor = pow(tempnor, LenzParameters.y);
         templenz.xyz *= tempnor;
         
         lenz += templenz;
      }
      lenz.xyz *= 0.25 * LenzParameters.x;

      bloom.xyz += lenz.xyz;
      bloom.w = max(lenz.xyz, max(lenz.y, lenz.z));
   }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
   return bloom;
}

_________________
| i5 | 8gb RAM | GTX660 | Windows 8 | Skyrim on SSD |
My music project, Akira Project, website at Sound Cloud



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group