Changeset 3365 for GTP


Ignore:
Timestamp:
04/29/09 18:10:02 (15 years ago)
Author:
mattausch
Message:

completely changing concept: storing world space position for one lookup!!

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

Legend:

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

    r3362 r3365  
    828828        //fbo->AddColorBuffer(ColorBufferObject::RGB_UBYTE, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST); 
    829829        // buffer holding the difference vector to the old frame 
    830         fbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 
     830        fbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 
    831831        //fbo->AddColorBuffer(ColorBufferObject::RGB_UBYTE, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 
    832832        // another color buffer 
     
    12081208 
    12091209                //const float rotAngle = M_PI * 1e-3f; 
    1210                 //const float rotAngle = 0.3f * M_PI / 180.0f; 
    1211                 const float rotAngle = 0.6f * M_PI / 180.0f; 
     1210                const float rotAngle = 1.5f * M_PI / 180.0f; 
     1211                //const float rotAngle = 0.6f * M_PI / 180.0f; 
    12121212 
    12131213                Matrix4x4 rotMatrix = RotationZMatrix(rotAngle); 
     
    12211221 
    12221222                //const float moveSpeed = 5e-3f; 
    1223                 const float moveSpeed = 1e-1f; 
     1223                const float moveSpeed = 5e-1f; 
    12241224                motionPath->Move(moveSpeed); 
    12251225        } 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsaoSep.cg

    r3364 r3365  
    275275        //OUT.illum_col.xyz = float3(ao.w * 5e-1f, 0, 0); 
    276276        //OUT.illum_col.xyz = float3(ao.z * 1e-3f); 
    277         //OUT.illum_col.xyz = float3(ao.y * 1e-3f); 
    278         OUT.illum_col.xyz = float3(ao.y); 
     277         
     278        //OUT.illum_col.xyz = float3(ao.y * 5e-4f); 
     279        //OUT.illum_col.xyz = float3(ao.y); 
    279280        //OUT.illum_col.xyz = ao.xyz; 
    280281 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r3364 r3365  
    312312                          (oldEyeSpaceDepth < DEPTH_THRESHOLD) && (projectedEyeSpaceDepth < DEPTH_THRESHOLD) && 
    313313                          //(oldDynamic || newDynamic) &&  // check if we have a dynamic object  
    314                           (depthDif > 5e-3f)))//MIN_DEPTH_DIFF))) 
     314                          (depthDif > 5e-2f)))//MIN_DEPTH_DIFF))) 
    315315                          ) // and there is a depth discontinuity 
    316316        {        
     
    322322        } 
    323323         
    324         isPixelValid = depthDif; 
     324        //isPixelValid = depthDif; 
    325325 
    326326        return float2(isPixelValid, abs(oldEyeSpaceDepth - projectedEyeSpaceDepth)); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r3364 r3365  
    547547                // they possibly have any influence on the ao 
    548548 
    549                 if (1)//cosAngle > 0) 
    550                 { 
    551                         float pixelValid = sampleColor.x; 
     549                if (cosAngle >= 0) 
     550                { 
     551                        float pixelValid = 0;//sampleColor.x; 
    552552 
    553553                        if (1)//pixelValid < 0.5f) 
     
    555555                                const float3 sampleDiffVec = tex2Dlod(attribsTex, float4(texcoord, .0f, .0f)).xyz; 
    556556                                //pixelValid = max(pixelValid, length(sampleDiffVec - diffVec) < 5e-3f ? .0f : 100.0f); 
    557                                 //pixelValid = max(pixelValid, length(sampleDiffVec - diffVec) < 5e-3f ? .0f : 4.0f); 
     557                                pixelValid = max(pixelValid, length(sampleDiffVec - diffVec) < 5e-3f ? .0f : 4.0f); 
    558558                                //pixelValid = length(sampleDiffVec - diffVec) < 1e-3f ? .0f : 10.0f; 
    559559                        } 
     
    686686#else 
    687687 
    688         const float3 diffVec = float3(.0f); 
     688        const float3 diffVec      = float3(.0f); 
    689689        const bool isMovingObject = false; 
    690         const float oldSsao = .0f; 
     690        const float oldSsao       = .0f; 
    691691         
    692692        float oldWeight = .0f; 
     
    754754                        const float factor = 4.0f; 
    755755                        //if (oldIdx >= factor * newWeight) oldIdx = 0; 
    756                         oldWeight = min(oldWeight, factor * newWeight); 
    757                         //oldWeight = oldIdx = .0f;  
     756                        //oldWeight = min(oldWeight, factor * newWeight); 
     757                        oldWeight = oldIdx = .0f;  
    758758                } 
    759759        } 
     
    771771        const float combinedWeight = clamp(newWeight + oldWeight, .0f, temporalCoherence); 
    772772 
    773         OUT.illum_col.y = ao.y;//combinedWeight; 
     773        OUT.illum_col.y = combinedWeight; 
    774774        OUT.illum_col.z = oldIdx + newWeight; // the new index 
    775775        OUT.illum_col.w = eyeSpaceDepth; 
Note: See TracChangeset for help on using the changeset viewer.