Changeset 3164 for GTP


Ignore:
Timestamp:
11/25/08 13:49:19 (16 years ago)
Author:
mattausch
Message:

good quality now for current settings

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

Legend:

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

    r3163 r3164  
    454454 
    455455 
    456         const float filterWidth = 100.0f; 
     456        //const float filterWidth = 100.0f; 
    457457        //const float filterWidth = 200.0f; 
    458         //const float filterWidth = 50.0f; 
     458        const float filterWidth = 15.0f; 
    459459 
    460460        PoissonDiscSampleGenerator2 poisson(NUM_SSAO_FILTERSAMPLES, 1.0f); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg

    r3163 r3164  
    9797                                                   uniform sampler2D colorsTex, 
    9898                                                   uniform float2 filterOffs[NUM_SSAO_FILTERSAMPLES], 
    99                                                    uniform float filterWeights[NUM_SSAO_FILTERSAMPLES], 
    10099                                                   float scale, 
    101100                                                   float3 bl, 
     
    137136                //normalFactor = max(step(0.6f, dot(sampleNorm, centerNormal)), 1e-3f); 
    138137                normalFactor = max(dot(sampleNorm, samplePos), 1e-3f); 
    139                 convergenceFactor = min(100.0f, aoSample.y); 
    140                 //convergenceFactor = aoSample.y; 
     138                //convergenceFactor = min(100.0f, aoSample.y); 
     139                convergenceFactor = aoSample.y; 
    141140 
    142141                // combine the weights 
     
    181180*/ 
    182181 
    183         const float eyeSpaceDepth = col.w; 
    184  
    185         const float scaleFactor = 2.0f; 
    186         const float distanceScale = scaleFactor / (eyeSpaceDepth + scaleFactor); 
    187  
    188         const float convergence = ao.y; 
    189  
    190         const float adaptFactor = 5.0f; 
    191         const float convergenceScale = adaptFactor / (convergence + adaptFactor); 
    192  
    193  
    194182        if ((ao.y < 100.0f) && (col.w < 1e10f)) 
    195183        //if (col.w < 1e10f) 
    196184        { 
    197                 ao.x = DiscontinuityFilter2(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, filterWeights, convergenceScale * distanceScale, bl, br, tl, tr); 
     185                const float eyeSpaceDepth = col.w; 
     186                const float distanceScaleWeight = 2.0f; 
     187                //const float distanceScale = distanceScaleWeight / (eyeSpaceDepth + distanceScaleWeight); 
     188                const float distanceScale = 1.0f; 
     189 
     190                const float convergence = ao.y; 
     191                const float adaptWeight = 5.0f; 
     192                const float convergenceScale = adaptWeight / (convergence + adaptWeight); 
     193 
     194                const float scale = convergenceScale * distanceScale; 
     195 
     196 
     197                ao.x = DiscontinuityFilter2(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, scale, bl, br, tl, tr); 
    198198        } 
    199199 
    200         //OUT.illum_col.xyz = col.xyz * ao.x; 
    201         OUT.illum_col.xyz = float3(ao.x, ao.x, ao.x); 
     200        OUT.illum_col.xyz = col.xyz * ao.x; 
     201        //OUT.illum_col.xyz = float3(ao.x, ao.x, ao.x); 
    202202        //OUT.illum_col.xyz = float3(0, clamp(1.0f - ao.y * 1e-2f, 0, 1), 1); 
    203203        OUT.illum_col.w = col.w; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r3160 r3164  
    291291 
    292292        if ((((squaredLen <= DYNAMIC_OBJECTS_THRESHOLD) && (oldPixel.z <= DYNAMIC_OBJECTS_THRESHOLD)) ||  
    293                 (depthDif <= 1e-2)) 
     293                (depthDif <= MIN_DEPTH_DIFF)) 
    294294                && (oldTexCoords.x >= 0.0f) && (oldTexCoords.x < 1.0f) 
    295295                && (oldTexCoords.y >= 0.0f) && (oldTexCoords.y < 1.0f) 
Note: See TracChangeset for help on using the changeset viewer.