Ignore:
Timestamp:
10/05/08 23:13:58 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r3002 r3005  
    203203DeferredRenderer::SAMPLING_METHOD samplingMethod = DeferredRenderer::SAMPLING_QUADRATIC; 
    204204 
    205  
    206 static Matrix4x4 matProjectionView = IdentityMatrix(); 
    207  
    208  
    209205ShadowMap *shadowMap = NULL; 
    210206DirectionalLight *light = NULL; 
     
    287283static CGparameter sBLParamTex; 
    288284 
    289 static Matrix4x4 oldViewProjMatrix; 
    290 static Matrix4x4 oldMatViewing; 
     285static Matrix4x4 viewProjMat = IdentityMatrix(); 
     286static Matrix4x4 oldViewProjMat = IdentityMatrix(); 
    291287 
    292288 
     
    668664        fbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, ColorBufferObject::FILTER_NEAREST); 
    669665        // the positions buffer 
    670         fbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST); 
    671         //fbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, ColorBufferObject::FILTER_NEAREST); 
     666        //fbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST); 
     667        fbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, ColorBufferObject::FILTER_NEAREST); 
    672668        // the normals buffer 
    673669        fbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST); 
     
    905901{ 
    906902        // store matrix of last frame 
    907         oldViewProjMatrix = matProjectionView; 
    908         camera->GetModelViewMatrix(oldMatViewing); 
     903        oldViewProjMat = viewProjMat; 
    909904 
    910905        glMatrixMode(GL_PROJECTION); 
     
    926921 
    927922        // store matrix for later use 
    928         matProjectionView = matViewing * matProjection; 
     923        viewProjMat = matViewing * matProjection; 
    929924         
    930925        if ((renderMethod == RENDER_DEFERRED) || (renderMethod == RENDER_DEPTH_PASS_DEFERRED)) 
     
    11701165                // otherwise the temporal coherency is broken 
    11711166                BvhNode::SetCurrentState(1); 
    1172                 shadowMap->RenderShadowView(shadowTraverser, matProjectionView); 
     1167                shadowMap->RenderShadowView(shadowTraverser, viewProjMat); 
    11731168                BvhNode::SetCurrentState(0); 
    11741169        } 
     
    11771172                // actually render the scene geometry using the specified algorithm 
    11781173                traverser->RenderScene(); 
    1179 /* 
    1180 #if 0 
    1181                 SceneEntityContainer::const_iterator sit, sit_end = sceneEntities.end(); 
    1182  
    1183                 for (sit = sceneEntities.begin(); sit != sit_end; ++ sit) 
    1184                         renderQueue->Enqueue(*sit); 
    1185 #else 
    1186  
    1187                 SceneEntityContainer::const_iterator sit, sit_end = sceneEntities2.end(); 
    1188  
    1189                 for (sit = sceneEntities2.begin(); sit != sit_end; ++ sit) 
    1190                         renderQueue->Enqueue(*sit); 
    1191 #endif 
    1192 */                       
    1193                 renderQueue->Apply(); 
     1174                //renderQueue->Apply(); 
    11941175        } 
    11951176 
     
    12441225 
    12451226                ShadowMap *sm = showShadowMap ? shadowMap : NULL; 
    1246                 ssaoShader->Render(fbo, oldViewProjMatrix, matProjectionView, ssaoTempCohFactor, light, useHDR, sm); 
     1227                ssaoShader->Render(fbo, oldViewProjMat, viewProjMat, ssaoTempCohFactor, light, useHDR, sm); 
    12471228        } 
    12481229 
     
    21732154         
    21742155        // the scene is rendered withouth any shading    
    2175         shadowMap->ComputeShadowMap(shadowTraverser, matProjectionView); 
     2156        shadowMap->ComputeShadowMap(shadowTraverser, viewProjMat); 
    21762157 
    21772158        glEnable(GL_CULL_FACE); 
Note: See TracChangeset for help on using the changeset viewer.