- Timestamp:
- 09/23/08 18:02:33 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r2966 r2967 35 35 static CGprogram sCgCombinedIllumProgram = NULL; 36 36 37 37 38 /////////////////////////////////////// 38 39 … … 98 99 99 100 static CGparameter sImageKeyParam; 100 static CGparameter sImageKeyShadowParam;101 101 102 102 //#define USE_3D_SSAO … … 286 286 sNormalsTexDeferredParam = cgGetNamedParameter(sCgDeferredProgram, "normals"); 287 287 sLightDirParam = cgGetNamedParameter(sCgDeferredProgram, "lightDir"); 288 289 sImageKeyParam = cgGetNamedParameter(sCgDeferredProgram, "imageKey");290 288 } 291 289 else … … 408 406 cgGLLoadProgram(sCgAntiAliasingProgram); 409 407 408 sImageKeyParam = cgGetNamedParameter(sCgAntiAliasingProgram, "imageKey"); 409 410 410 sColorsTexAntiAliasingParam = cgGetNamedParameter(sCgAntiAliasingProgram, "colors"); 411 411 sNormalsTexAntiAliasingParam = cgGetNamedParameter(sCgAntiAliasingProgram, "normals"); … … 440 440 sLightDirShadowParam = cgGetNamedParameter(sCgDeferredShadowProgram, "lightDir"); 441 441 442 sImageKeyShadowParam = cgGetNamedParameter(sCgDeferredShadowProgram, "imageKey");443 442 444 443 PoissonDiscSampleGenerator2 poisson(NUM_PCF_TABS, 1.0f); … … 668 667 void DeferredRenderer::AntiAliasing(FrameBufferObject *fbo) 669 668 { 669 const float imageKey = ToneMapper().CalcImageKey(fbo->GetColorBuffer(colorBufferIdx)); 670 670 671 GLuint colorsTex = fbo->GetColorBuffer(colorBufferIdx)->GetTexture(); 671 672 GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture(); … … 681 682 cgGLSetTextureParameter(sNormalsTexAntiAliasingParam, normalsTex); 682 683 cgGLEnableTextureParameter(sNormalsTexAntiAliasingParam); 684 685 cgGLSetParameter1f(sImageKeyParam, imageKey); 683 686 684 687 glColor3f(1.0f, 1.0f, 1.0f); … … 708 711 void DeferredRenderer::FirstPass(FrameBufferObject *fbo, DirectionalLight *light) 709 712 { 710 const float imageKey = ToneMapper().CalcImageKey(fbo->GetColorBuffer(0));711 712 713 GLuint colorsTex = fbo->GetColorBuffer(0)->GetTexture(); 713 714 GLuint positionsTex = fbo->GetColorBuffer(1)->GetTexture(); … … 737 738 cgGLSetParameter3f(sLightDirParam, lightDir.x, lightDir.y, lightDir.z); 738 739 739 cgGLSetParameter1f(sImageKeyParam, imageKey);740 740 741 741 glColor3f(1.0f, 1.0f, 1.0f); … … 978 978 ShadowMap *shadowMap) 979 979 { 980 const float imageKey = ToneMapper().CalcImageKey(fbo->GetColorBuffer(0));981 982 980 GLuint colorsTex = fbo->GetColorBuffer(0)->GetTexture(); 983 981 … … 1024 1022 cgGLSetParameter3f(sLightDirShadowParam, lightDir.x, lightDir.y, lightDir.z); 1025 1023 1026 // the average log luminance for tone mapping1027 cgGLSetParameter1f(sImageKeyShadowParam, imageKey);1028 1024 1029 1025 glColor3f(1.0f, 1.0f, 1.0f);
Note: See TracChangeset
for help on using the changeset viewer.