- Timestamp:
- 04/14/09 08:59:19 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3349 r3350 447 447 448 448 mTempFbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 449 mTempFbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 449 450 FrameBufferObject::InitBuffer(mTempFbo, 0); 451 FrameBufferObject::InitBuffer(mTempFbo, 1); 450 452 451 453 … … 561 563 ////////////// 562 564 563 string deferredParams[] = {"colors", "normals", "lightDir" };564 sCgDeferredProgram->AddParameters(deferredParams, 0, 3);565 string deferredParams[] = {"colors", "normals", "lightDir", "aoTex"}; 566 sCgDeferredProgram->AddParameters(deferredParams, 0, 4); 565 567 566 568 /////////////////// … … 652 654 InitFrame(); 653 655 654 if (shadowMap)656 /*if (shadowMap) 655 657 FirstPassShadow(fbo, light, shadowMap); 656 658 else 657 659 FirstPass(fbo, light); 660 */ 658 661 659 662 if (mShadingMethod != 0) … … 681 684 } 682 685 686 if (shadowMap) 687 FirstPassShadow(fbo, light, shadowMap); 688 else 689 FirstPass(fbo, light); 690 683 691 /// depth of field 684 692 if (mUseDepthOfField) … … 958 966 GLuint colorsTex = fbo->GetColorBuffer(colorBufferIdx)->GetTexture(); 959 967 GLuint normalsTex = fbo->GetColorBuffer(1)->GetTexture(); 968 GLuint aoTex = mTempFbo->GetColorBuffer(1)->GetTexture(); 960 969 961 970 FlipFbos(fbo); … … 966 975 sCgDeferredProgram->SetTexture(1, normalsTex); 967 976 sCgDeferredProgram->SetValue3f(2, lightDir.x, lightDir.y, lightDir.z); 968 977 sCgDeferredProgram->SetTexture(3, aoTex); 978 969 979 DrawQuad(sCgDeferredProgram); 970 980 … … 1093 1103 GLuint ssaoTex = mTempFbo->GetColorBuffer(0)->GetTexture(); 1094 1104 1095 FlipFbos(fbo); 1105 mTempFbo->Bind(); 1106 glDrawBuffers(1, mrt + 1); 1107 //FlipFbos(fbo); 1096 1108 1097 1109 int i = 0;
Note: See TracChangeset
for help on using the changeset viewer.