Ignore:
Timestamp:
12/08/08 23:13:38 (16 years ago)
Author:
mattausch
Message:

worked on lense flare, cleaned up code a little bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/lenseFlare.cg

    r3214 r3215  
    3434                                  uniform sampler2D flareTex5, 
    3535                                  uniform float2 vectorToLight, // vector to current light position 
    36                                   uniform float distanceToLight // distance to current light position 
     36                                  uniform float distanceToLight, // distance to current light position 
     37                                  uniform float sunVisiblePixels 
    3738                                  ): COLOR 
    3839{ 
     
    5859 
    5960        //result.xyz = float3(0); 
     61        sunVisiblePixels = clamp(sunVisiblePixels, .0f, 100.0f) * 0.01f; 
     62 
    6063        for (int i = 0; i < 8; ++ i) 
    61                 result.xyz += flare[i].xyz; 
     64                result.xyz += flare[i].xyz * sunVisiblePixels; 
    6265 
    6366        return result; 
Note: See TracChangeset for help on using the changeset viewer.