Ignore:
Timestamp:
12/07/08 23:26:00 (16 years ago)
Author:
mattausch
Message:

made ssao parameters more flexible
started to implement lense flare

File:
1 edited

Legend:

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

    r3168 r3212  
    6565                                   uniform float3 br, 
    6666                                   uniform float3 tl, 
    67                                    uniform float3 tr 
    68                                    , uniform float3 viewDir 
     67                                   uniform float3 tr,  
     68                                   float3 viewDir, 
     69                                   float sampleIntensity 
    6970                                   ) 
    7071{ 
     
    125126                const float denom = (DISTANCE_SCALE + magSample * magSample); 
    126127 
    127                 float2 intensity = float2(SAMPLE_INTENSITY, ILLUM_INTENSITY); 
     128                float2 intensity = float2(sampleIntensity, ILLUM_INTENSITY); 
    128129                intensity /= denom; 
    129130 
     
    161162                   uniform float3 br, 
    162163                   uniform float3 tl, 
    163                    uniform float3 tr 
     164                   uniform float3 tr, 
     165                   uniform float kernelRadius, 
     166                   uniform float sampleIntensity 
    164167                   ) 
    165168{ 
    166169        pixel2 OUT; 
    167170 
    168         const float3 normal = tex2Dlod(normals, float4(IN.texCoord, 0 ,0)); 
     171        const float3 normal = tex2Dlod(normals, float4(IN.texCoord, 0 ,0)).xyz; 
    169172 
    170173         
     
    180183        float4 currentPos = mul(modelViewProj, eyeSpacePos); 
    181184 
    182         const float w = SAMPLE_RADIUS / currentPos.w; 
     185        const float w = kernelRadius / currentPos.w; 
    183186        currentPos /= currentPos.w; 
    184187         
     
    188191        //-- compute color bleeding + ao 
    189192 
    190         GiStruct gi = globIllum(IN, colors, noiseTex, samples, normal, eyeSpacePos, w, bl, br, tl, tr, normalize(IN.view)); 
     193        GiStruct gi = globIllum(IN, colors, noiseTex, samples, normal, eyeSpacePos, w, bl, br, tl, tr, normalize(IN.view), sampleIntensity); 
    191194         
    192195 
Note: See TracChangeset for help on using the changeset viewer.