Ignore:
Timestamp:
11/27/08 02:14:31 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
Files:
3 edited

Legend:

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

    r3175 r3189  
    7676 
    7777        //const float de = saturate(dot(dd, weights.y)); 
    78         const float de = weights.y * dd.x + dd.y + dd.z + dd.w; 
     78        const float de = weights.y * dd.x * dd.y * dd.z * dd.w; 
    7979 
    8080 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg

    r3168 r3189  
    130130                spatialFactor = 1.0f / max(len, 1e-3f); 
    131131 
    132                 //normalFactor = max(step(0.6f, dot(sampleNorm, centerNormal)), 1e-3f); 
    133                 normalFactor = max(dot(sampleNorm, samplePos), 1e-3f); 
     132                normalFactor = max(step(.0f, dot(sampleNorm, centerNormal)), 1e-3f); 
     133                //normalFactor = max(dot(sampleNorm, samplePos), 1e-3f); 
    134134                //convergenceFactor = min(100.0f, aoSample.y); 
    135135                convergenceFactor = aoSample.y; 
     
    137137                // combine the weights 
    138138                w = convergenceFactor * spatialFactor * normalFactor; 
     139                //w = convergenceFactor * spatialFactor; 
    139140 
    140141                average += aoSample.x * w; 
     
    169170        float4 ao = tex2Dlod(ssaoTex, float4(IN.texCoord, 0, 0)); 
    170171 
    171         // reconstruct position from the eye space depth 
    172         /*const float4 worldPos = float4(-IN.view * eyeSpaceDepth, 1.0f); 
    173         // compute w factor from projection in order to control filter size 
    174         const float4 projPos = mul(modelViewProj, worldPos); 
    175         const float distanceScale = 1.0f / projPos.w; 
    176 */ 
    177  
    178172        // filter up to a certain convergance value and leave out background (sky) by checking depth 
    179173        if ((ao.y < 100.0f) && (col.w < 1e10f)) 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r3168 r3189  
    290290        float validPixel; 
    291291 
    292         if ((((squaredLen <= DYNAMIC_OBJECTS_THRESHOLD) && (oldPixel.z <= DYNAMIC_OBJECTS_THRESHOLD)) ||  
    293                 (depthDif <= MIN_DEPTH_DIFF)) 
     292        const bool oldDynamic = (squaredLen <= DYNAMIC_OBJECTS_THRESHOLD); 
     293        const bool newDynamic = (oldPixel.z <= DYNAMIC_OBJECTS_THRESHOLD); 
     294 
     295        if (!(oldDynamic && !newDynamic) && !(!oldDynamic && newDynamic) && 
     296                !(oldDynamic && newDynamic && (depthDif > MIN_DEPTH_DIFF)) 
    294297                && (oldTexCoords.x >= 0.0f) && (oldTexCoords.x < 1.0f) 
    295298                && (oldTexCoords.y >= 0.0f) && (oldTexCoords.y < 1.0f) 
Note: See TracChangeset for help on using the changeset viewer.