Changeset 3190 for GTP


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

Legend:

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

    r3189 r3190  
    293293        //-- the flip-flop fbos 
    294294 
    295         //const int dsw = w / 2; const int dsh = h / 2; 
    296         const int dsw = w; const int dsh = h; 
     295        const int dsw = w / 2; const int dsh = h / 2; 
     296        //const int dsw = w; const int dsh = h; 
    297297 
    298298        mIllumFbo = new FrameBufferObject(dsw, dsh, FrameBufferObject::DEPTH_NONE); 
     
    317317        mDownSampleFbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 
    318318        // downsample buffer for the offset texture 
    319         mDownSampleFbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 
     319        mDownSampleFbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 
    320320 
    321321        for (int i = 0; i < 3; ++ i) 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg

    r3189 r3190  
    132132                normalFactor = max(step(.0f, dot(sampleNorm, centerNormal)), 1e-3f); 
    133133                //normalFactor = max(dot(sampleNorm, samplePos), 1e-3f); 
    134                 //convergenceFactor = min(100.0f, aoSample.y); 
    135                 convergenceFactor = aoSample.y; 
     134                convergenceFactor = min(20.0f, aoSample.y); 
     135                //convergenceFactor = aoSample.y; 
    136136 
    137137                // combine the weights 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r3189 r3190  
    284284         
    285285        const float depthDif = abs(1.0f - oldEyeSpaceDepth / projectedEyeSpaceDepth); 
    286  
    287286        const float squaredLen = SqrLen(diffVec); 
    288287         
     
    290289        float validPixel; 
    291290 
    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)) 
     291        const bool oldDynamic = (squaredLen > DYNAMIC_OBJECTS_THRESHOLD); 
     292        const bool newDynamic = (oldPixel.z > DYNAMIC_OBJECTS_THRESHOLD); 
     293 
     294        if (!(oldDynamic && !newDynamic) && !(!oldDynamic && newDynamic)  
     295                && !(oldDynamic && newDynamic && (depthDif <= MIN_DEPTH_DIFF)) 
    297296                && (oldTexCoords.x >= 0.0f) && (oldTexCoords.x < 1.0f) 
    298297                && (oldTexCoords.y >= 0.0f) && (oldTexCoords.y < 1.0f) 
Note: See TracChangeset for help on using the changeset viewer.