Ignore:
Timestamp:
02/17/09 19:21:52 (15 years ago)
Author:
mattausch
Message:

surpressed blur, worked on object placing in sibenik (why performance worse than vienna??)

File:
1 edited

Legend:

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

    r3314 r3316  
    5858                                        float3 br, 
    5959                                        float3 tl, 
    60                                         float3 tr) 
     60                                        float3 tr, 
     61                                        float maxConvergence) 
    6162{ 
    6263        float2 aoSample = tex2Dlod(ssaoTex, sampleTexCoord); 
     
    7273        float spatialFactor = 1.0f / max(len, 1e-3f); 
    7374 
    74         float convergenceFactor = aoSample.y + 1.0f; 
     75        float convergenceFactor = min(aoSample.y + 1.0f, maxConvergence); 
     76        convergenceFactor *= convergenceFactor; 
    7577 
    7678        // combine the weights 
    77         //float w = convergenceFactor * convergenceFactor * spatialFactor; 
    7879        float w = convergenceFactor * spatialFactor; 
    7980        //float w = spatialFactor; 
     
    9697                           float3 tr, 
    9798                           float2 xyStep, 
    98                            float convergence) 
     99                           float convergence, 
     100                           float maxConvergence 
     101                           ) 
    99102{ 
    100103        float2 result = float2(0.0f, 0.0f); 
     
    109112        { 
    110113                float4 sampleTexCoord = float4(texCoord + i * xyStep * scale, .0f, .0f); 
    111                 result += FilterSample(sampleTexCoord, ssaoTex, colorsTex, centerPos, bl, br, tl, tr); 
     114                result += FilterSample(sampleTexCoord, ssaoTex, colorsTex, centerPos, bl, br, tl, tr, maxConvergence); 
    112115        } 
    113116 
     
    148151        { 
    149152                // the filtered ssao value 
    150                 OUT.illum_col.x = FilterXY(IN.texCoord, ssaoTex, colorsTex, bl, br, tl, tr, xyStep, convergence); 
     153                OUT.illum_col.x = FilterXY(IN.texCoord, ssaoTex, colorsTex, bl, br, tl, tr, xyStep, convergence, maxConvergence); 
    151154        } 
    152155 
     
    163166                                                uniform float3 tl, 
    164167                                                uniform float3 tr, 
    165                                                 uniform float2 res 
     168                                                uniform float2 res, 
     169                                                uniform float maxConvergence 
    166170                                                ) 
    167171{ 
     
    183187        { 
    184188                // the filtered ssao value 
    185                 OUT.illum_col.x = FilterXY(IN.texCoord, ssaoTex, colorsTex, bl, br, tl, tr, xyStep, convergence); 
     189                OUT.illum_col.x = FilterXY(IN.texCoord, ssaoTex, colorsTex, bl, br, tl, tr, xyStep, convergence, maxConvergence); 
    186190        } 
    187191 
     
    200204                                  uniform float3 tl, 
    201205                                  uniform float3 tr, 
    202                                   uniform float2 res 
     206                                  uniform float2 res, 
     207                                  uniform float maxConvergence 
    203208                                  ) 
    204209{ 
     
    221226        { 
    222227                // the filtered ssao value 
    223                 ao.x = FilterXY(IN.texCoord, ssaoTex, colorsTex, bl, br, tl, tr, xyStep, convergence); 
     228                ao.x = FilterXY(IN.texCoord, ssaoTex, colorsTex, bl, br, tl, tr, xyStep, convergence, maxConvergence); 
    224229        } 
    225230 
Note: See TracChangeset for help on using the changeset viewer.