Changeset 3339 for GTP


Ignore:
Timestamp:
04/10/09 15:46:35 (15 years ago)
Author:
mattausch
Message:

commiting changes after a long time (kenn mi nimma aus)

Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.cpp

    r3338 r3339  
    9191                                        (s[j].y - ry) * (s[j].y - ry); 
    9292                         
    93                                 if (dist < sqrMinDist) 
    94                                         sampleValid = false; 
     93                                if (dist < sqrMinDist) sampleValid = false; 
    9594                        } 
    9695 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsaoSep.cg

    r3328 r3339  
    109109        const float3 centerPos = ReconstructSamplePos(colorsTex, texCoord, bl, br, tl, tr); 
    110110 
    111         const float scale = 1.0f;//saturate((SSAO_CONVERGENCE_THRESHOLD - convergence) / SSAO_CONVERGENCE_THRESHOLD); 
     111        const float scale = saturate((SSAO_CONVERGENCE_THRESHOLD - convergence) / SSAO_CONVERGENCE_THRESHOLD); 
    112112        //const int radius = SSAO_FILTER_RADIUS * saturate((SSAO_CONVERGENCE_THRESHOLD - convergence) / SSAO_CONVERGENCE_THRESHOLD); 
    113113         
     
    115115        for (int i = -SSAO_FILTER_RADIUS; i <= SSAO_FILTER_RADIUS; ++ i) 
    116116        { 
    117                 float4 sampleTexCoord = float4(texCoord + i * xyStep * scale, .0f, .0f); 
     117                const float4 sampleTexCoord = float4(texCoord + i * xyStep * scale, .0f, .0f); 
    118118                result += FilterSample(sampleTexCoord, ssaoTex, colorsTex, centerPos, bl, br, tl, tr, maxConvergence, spatialWeight); 
    119119        } 
    120120 
    121121        result.x /= max(result.y, 1e-6f); 
    122  
    123122        return saturate(result.x); 
    124123} 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r3331 r3339  
    1616}; 
    1717 
    18  
    19 /*struct pixel 
    20 { 
    21         float4 illum_col: COLOR0; 
    22 }; 
    23 */ 
    2418 
    2519struct pixel2 
     
    251245                // angle between current normal and direction to sample controls AO intensity. 
    252246                //const float cosAngle2 = dot(-dirSample, sampleNormal); 
    253                 const float cosAngle2 = .5f + dot(sampleNormal, -normal) * 0.5f; 
     247                const float cosAngle2 = .5f + dot(sampleNormal, -normal) * .5f; 
    254248 
    255249                dirSample *= minDist; 
     
    257251 
    258252                //const float aoContrib = (1.0f > lengthToSample) ? occlusionPower(9e-2f, DISTANCE_SCALE + lengthToSample): .0f; 
    259                 total_ao += max(cosAngle, .0f) * max(cosAngle2, .0f) * aoContrib; 
     253                //total_ao += max(cosAngle, .0f) * max(cosAngle2, .0f) * aoContrib; 
     254                total_ao += max(cosAngle, .0f) * cosAngle2 * aoContrib; 
    260255 
    261256                ++ numSamples; 
     
    274269#if 1 
    275270                const float tooFarAway = step(0.5f, lengthToSample - changeFactor); 
    276  
    277271                const float partlyResetThres = 1.0f; 
    278272 
Note: See TracChangeset for help on using the changeset viewer.