- Timestamp:
- 08/27/08 16:14:10 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SsaoShader.cpp
r2873 r2874 106 106 mScaleFactor(scaleFactor) 107 107 { 108 109 108 /////////// 110 109 //-- the flip-flop fbos … … 222 221 sNoiseMultiplierGiParam = cgGetNamedParameter(sCgGiProgram, "noiseMultiplier"); 223 222 224 sOldModelViewProjMatrix Param = cgGetNamedParameter(sCgGiProgram, "oldModelViewProj");223 sOldModelViewProjMatrixGiParam = cgGetNamedParameter(sCgGiProgram, "oldModelViewProj"); 225 224 sMaxDepthGiParam = cgGetNamedParameter(sCgGiProgram, "maxDepth"); 226 225 sExpFactorGiParam = cgGetNamedParameter(sCgGiProgram, "expFactor"); … … 272 271 swap(mNewFbo, mOldFbo); 273 272 274 cgGLSetMatrixParameterfc(sOldModelViewProjMatrixParam, (const float *)oldProjViewMatrix.x);275 273 276 274 glPushAttrib(GL_VIEWPORT_BIT); … … 300 298 FirstPass(fbo); 301 299 302 ComputeSsao(fbo, expFactor);303 //ComputeGlobIllum(fbo, expFactor);300 //ComputeSsao(fbo, expFactor, oldProjViewMatrix); 301 ComputeGlobIllum(fbo, expFactor, oldProjViewMatrix); 304 302 305 303 //Combine(fbo); … … 321 319 322 320 323 void SsaoShader::ComputeSsao(FrameBufferObject *fbo, float expFactor) 324 { 321 void SsaoShader::ComputeSsao(FrameBufferObject *fbo, 322 float expFactor, 323 const Matrix4x4 &oldProjViewMatrix 324 ) 325 { 326 cgGLSetMatrixParameterfc(sOldModelViewProjMatrixParam, (const float *)oldProjViewMatrix.x); 327 325 328 GLuint colorsTex = mFbo3->GetColorBuffer(0)->GetTexture(); 326 329 GLuint positionsTex = fbo->GetColorBuffer(1)->GetTexture(); … … 582 585 583 586 584 void SsaoShader::ComputeGlobIllum(FrameBufferObject *fbo, float expFactor) 585 { 587 void SsaoShader::ComputeGlobIllum(FrameBufferObject *fbo, 588 float expFactor, 589 const Matrix4x4 &oldProjViewMatrix 590 ) 591 { 592 cgGLSetMatrixParameterfc(sOldModelViewProjMatrixGiParam, (const float *)oldProjViewMatrix.x); 593 586 594 GLuint colorsTex = mFbo3->GetColorBuffer(0)->GetTexture(); 587 595 GLuint positionsTex = fbo->GetColorBuffer(1)->GetTexture();
Note: See TracChangeset
for help on using the changeset viewer.