Changeset 3212 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
- Timestamp:
- 12/07/08 23:26:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3203 r3212 147 147 float turbitity = 5.0f; 148 148 149 // ssao parameters 150 float ssaoKernelRadius = 1e-8f; 151 float ssaoSampleIntensity = 0.2f; 152 float ssaoTempCohFactor = 255.0; 153 bool sortSamples = true; 154 149 155 int shadowSize = 2048; 156 150 157 /// the hud font 151 158 glfont::GLFont myfont; 152 159 153 160 // rendertexture 154 staticint texWidth = 1024;155 staticint texHeight = 768;161 int texWidth = 1024; 162 int texHeight = 768; 156 163 157 164 int renderedObjects = 0; … … 211 218 212 219 PerfTimer frameTimer, algTimer; 213 /// the performance window220 /// the performance graph window 214 221 PerformanceGraph *perfGraph = NULL; 215 222 216 float ssaoTempCohFactor = 255.0;217 bool sortSamples = true;218 223 int sCurrentMrtSet = 0; 219 224 … … 384 389 env.GetIntParam(string("renderMethod"), renderMethod); 385 390 391 env.GetFloatParam(string("ssaoKernelRadius"), ssaoKernelRadius); 392 env.GetFloatParam(string("ssaoSampleIntensity"), ssaoSampleIntensity); 393 386 394 //env.GetStringParam(string("modelPath"), model_path); 387 395 //env.GetIntParam(string("numSssaoSamples"), numSsaoSamples); 396 397 texWidth = winWidth; 398 texHeight = winHeight; 388 399 389 400 cout << "assumedVisibleFrames: " << assumedVisibleFrames << endl; … … 398 409 cout << "useLODs: " << useLODs << endl; 399 410 cout << "camPosition: " << camPos << endl; 400 cout << "temporal coherence: " << ssaoTempCohFactor << endl;401 411 cout << "shadow size: " << shadowSize << endl; 402 412 cout << "render method: " << renderMethod << endl; … … 404 414 cout << "use advanced shading: " << useAdvancedShading << endl; 405 415 cout << "turbitity: " << turbitity << endl; 416 cout << "temporal coherence: " << ssaoTempCohFactor << endl; 417 cout << "sample intensity: " << ssaoSampleIntensity << endl; 418 cout << "kernel radius: " << ssaoKernelRadius << endl; 406 419 407 420 //cout << "model path: " << model_path << endl; … … 1151 1164 deferredShader->SetShadingMethod(shadingMethod); 1152 1165 deferredShader->SetSamplingMethod(samplingMethod); 1166 deferredShader->SetKernelRadius(ssaoKernelRadius); 1167 deferredShader->SetSampleIntensity(ssaoSampleIntensity); 1153 1168 deferredShader->SetUseTemporalCoherence(useTemporalCoherence); 1154 1169 deferredShader->SetSortSamples(sortSamples); … … 1203 1218 { 1204 1219 case 27: 1220 // write out current position on exit 1205 1221 Debug << "camPosition=" << camera->GetPosition().x << " " << camera->GetPosition().y << " " << camera->GetPosition().z << endl; 1206 1222 Debug << "camDirection=" << camera->GetDirection().x << " " << camera->GetDirection().y << " " << camera->GetDirection().z << endl; … … 1247 1263 break; 1248 1264 case '3': 1249 if (trianglesPerVirtualLeaf >= 100) 1250 trianglesPerVirtualLeaf -= 100; 1265 if (trianglesPerVirtualLeaf >= 100) trianglesPerVirtualLeaf -= 100; 1251 1266 bvh->SetVirtualLeaves(trianglesPerVirtualLeaf); 1252 1267 break; … … 1269 1284 case '8': 1270 1285 ssaoTempCohFactor *= 2.0f; 1271 //if (ssaoTempCohFactor > 1.0f) ssaoExpFactor = 1.0f; 1286 break; 1287 case '9': 1288 ssaoKernelRadius *= 0.8f; 1289 break; 1290 case '0': 1291 ssaoKernelRadius *= 1.2f; 1292 break; 1293 case 'n': 1294 ssaoSampleIntensity *= 0.9f; 1295 break; 1296 case 'N': 1297 ssaoSampleIntensity *= 1.1f; 1272 1298 break; 1273 1299 case 'l': … … 1344 1370 useAntiAliasing = !useAntiAliasing; 1345 1371 break; 1346 case '9':1372 /*case '?': 1347 1373 sortSamples = !sortSamples; 1348 1374 break; 1375 */ 1349 1376 default: 1350 1377 return; … … 2003 2030 2004 2031 preetham->RenderSkyDome(-light->GetDirection(), camera, &renderState, !useToneMapping); 2005 /// once again reset the renderState 2032 2033 /// once again reset the renderState just to make sure 2006 2034 renderState.Reset(); 2007 2035 }
Note: See TracChangeset
for help on using the changeset viewer.