Changeset 2894 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
- Timestamp:
- 09/02/08 09:07:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2893 r2894 175 175 176 176 static Matrix4x4 matProjectionView = IdentityMatrix(); 177 static Matrix4x4 matViewing = IdentityMatrix(); 178 179 ShadowMap ping *shadowMapping= NULL;177 178 179 ShadowMap *shadowMap = NULL; 180 180 Light *light = NULL; 181 181 … … 433 433 DeferredShader::Init(sCgContext); 434 434 SsaoShader::Init(sCgContext); 435 ShadowMapping::Init(sCgContext);436 435 437 436 … … 446 445 light = new Light(lightDir, RgbaColor(1, 1, 1, 1)); 447 446 448 shadowMapping = new ShadowMapping(bvh->GetBox(), 4096); 447 const float shadowSize = 4096; 448 shadowMap = new ShadowMap(shadowSize, bvh->GetBox(), camera); 449 449 450 450 // frame time is restarted every frame … … 796 796 ///////////////// 797 797 798 Matrix4x4 mat Projection;798 Matrix4x4 matViewing, matProjection; 799 799 800 800 camera->GetModelViewMatrix(matViewing); … … 904 904 case RenderState::DEFERRED: 905 905 906 shadowMap ping->ComputeShadowMap(light, traverser);906 shadowMap->ComputeShadowMap(light, traverser); 907 907 908 908 if (!fbo) InitFBO(); … … 975 975 //-- render sky 976 976 977 // q: should we render sky after deferred shading? (would conveniently solves some issues)978 // (e.g, skys without shadows)977 // q: should we render sky after deferred shading? 978 // this would conveniently solves some issues (e.g, skys without shadows) 979 979 980 980 RenderSky(); … … 999 999 if (!deferredShader) deferredShader = new DeferredShader(texWidth, texHeight, myfar / 10.0f); 1000 1000 1001 //deferredShader->Render(fbo); 1002 deferredShader->Render(fbo, matViewing, shadowMapping); 1001 deferredShader->Render(fbo, shadowMap); 1003 1002 } 1004 1003 }
Note: See TracChangeset
for help on using the changeset viewer.