Changeset 3247
- Timestamp:
- 01/05/09 16:48:21 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter.cpp
r3246 r3247 154 154 void ObjConverter::LoadShape(const VertexArray &faceVertices, 155 155 const VertexArray &faceNormals, 156 const vector<Texcoord> &faceTexcoords) 156 const vector<Texcoord> &faceTexcoords, 157 Material *mat) 157 158 { 158 159 int numElements = (int)faceVertices.size(); … … 167 168 geom->mTexcoordCount = (int)faceTexcoords.size(); 168 169 169 cout << "number of vertices=" << numElements << endl; 170 geom->mMaterial = mat; 171 172 cout << "new geometry #vts=" << numElements << endl; 170 173 171 174 for (int i = 0; i < numElements; ++ i) … … 244 247 } 245 248 249 Material *currentMat = NULL; 246 250 VertexArray faceVertices; 247 251 VertexArray faceNormals; … … 279 283 sscanf(str + 1, "%f %f %f", &x, &y, &z); 280 284 //const float scale = 5e-3f; 281 const float scale = 1.0f;285 const float scale = 5.0f; 282 286 vertices.push_back(SimpleVec(x * scale, y * scale, z* scale)); 283 287 //cout <<"v " << x << " " << y << " "<< z << " "; … … 294 298 faceVertices, faceNormals, faceTexcoords); 295 299 296 if (0 && 297 (((line % 1000) == 999) && !faceVertices.empty())) 300 break; 301 } // end face 302 case 'g': // load a new shape 303 { 304 if (!faceVertices.empty()) 298 305 { 299 306 ++ mNumShapes; 300 307 301 LoadShape(faceVertices, faceNormals, faceTexcoords );308 LoadShape(faceVertices, faceNormals, faceTexcoords, currentMat); 302 309 303 310 faceVertices.clear(); 304 311 faceNormals.clear(); 305 312 faceTexcoords.clear(); 313 314 currentMat = NULL; 306 315 } 307 308 break; 309 } // end face 310 case 'g': // load a new shape 311 {/* 312 if (!faceVertices.empty()) 313 { 314 ++ mNumShapes; 315 316 LoadShape(faceVertices, faceNormals, faceTexcoords); 317 318 faceVertices.clear(); 319 faceNormals.clear(); 320 faceTexcoords.clear(); 321 }*/ 322 } 316 } 317 break; 318 case 'u': // usemtl => material 319 { 320 string matName(str + 7); 321 // throw away linebreak character 322 matName.resize(matName.size() - 1); 323 324 currentMat = mMaterialTable[matName]; 325 cout << "matname: " << matName << endl; 326 } 327 323 328 break; 324 329 default: … … 334 339 ++ mNumShapes; 335 340 336 LoadShape(faceVertices, faceNormals, faceTexcoords );341 LoadShape(faceVertices, faceNormals, faceTexcoords, currentMat); 337 342 338 343 faceVertices.clear(); … … 364 369 /////// 365 370 //-- texture 366 371 /* 367 372 #ifdef USE_TEXTURE 368 373 int texId = 0; … … 401 406 str.write(reinterpret_cast<char *>(&emm), sizeof(SimpleVec)); 402 407 } 403 } 404 405 408 */ 409 } 410 411 #if 0 406 412 bool ObjConverter::WriteFile(const string &filename) 407 413 { … … 481 487 return true; 482 488 } 489 #else 490 bool ObjConverter::WriteFile(const string &filename) 491 { 492 ogzstream ofile(filename.c_str()); 493 494 if (!ofile.is_open()) 495 return false; 496 497 498 ///////// 499 //-- write textures 500 501 int textureCount = (int)mTextures.size(); 502 503 ofile.write(reinterpret_cast<char *>(&textureCount), sizeof(int)); 504 505 TextureArray::const_iterator tit, tit_end = mTextures.end(); 506 507 for (tit = mTextures.begin(); tit != tit_end; ++ tit) 508 { 509 const string texName = (*tit); 510 511 int texnameSize = (int)texName.length() + 1; 512 ofile.write(reinterpret_cast<char *>(&texnameSize), sizeof(int)); 513 514 ofile.write(texName.c_str(), sizeof(char) * texnameSize); 515 516 int boundS = 1, boundT = 1; 517 518 ofile.write(reinterpret_cast<char *>(&boundS), sizeof(int)); 519 ofile.write(reinterpret_cast<char *>(&boundT), sizeof(int)); 520 } 521 522 523 /////////// 524 //-- write shapes 525 526 ofile.write(reinterpret_cast<char *>(&mNumShapes), sizeof(int)); 527 528 vector<Geometry *>::const_iterator it, it_end = mGeometry.end(); 529 530 for (it = mGeometry.begin(); it != it_end; ++ it) 531 { 532 WriteGeometry(ofile, *it); 533 534 535 ///////// 536 //-- material 537 538 Material *mat = (*it)->mMaterial; 539 540 ofile.write(reinterpret_cast<char *>(&mat->texture), sizeof(int)); 541 542 bool alphaTestEnabled = false; 543 //bool cullFaceEnabled = false; 544 bool cullFaceEnabled = true; 545 546 ofile.write(reinterpret_cast<char *>(&alphaTestEnabled), sizeof(bool)); 547 ofile.write(reinterpret_cast<char *>(&cullFaceEnabled), sizeof(bool)); 548 549 // material 550 bool hasMaterial = true; 551 ofile.write(reinterpret_cast<char *>(&hasMaterial), sizeof(bool)); 552 553 SimpleVec ambient, diffuse, spec, emm; 554 555 ambient.x = ambient.y = ambient.z = 0.2f; 556 //diffuse.x = diffuse.y = diffuse.z = 1.0f; 557 diffuse.x = mat->rgb[0]; diffuse.y =mat->rgb[1]; diffuse.z = mat->rgb[2]; 558 spec.x = spec.y = spec.z = .0f; 559 emm = spec; 560 561 // only write rgb part of the material 562 ofile.write(reinterpret_cast<char *>(&ambient), sizeof(SimpleVec)); 563 ofile.write(reinterpret_cast<char *>(&diffuse), sizeof(SimpleVec)); 564 ofile.write(reinterpret_cast<char *>(&spec), sizeof(SimpleVec)); 565 ofile.write(reinterpret_cast<char *>(&emm), sizeof(SimpleVec)); 566 } 567 568 569 int entityCount = 1; 570 ofile.write(reinterpret_cast<char *>(&entityCount), sizeof(int)); 571 572 573 ////////// 574 //-- write single scene entity 575 576 // no transformation 577 bool hasTrafo = false; 578 ofile.write(reinterpret_cast<char *>(&hasTrafo), sizeof(bool)); 579 580 // a dummy lod 581 int numLODs = 1; 582 ofile.write(reinterpret_cast<char *>(&numLODs), sizeof(int)); 583 584 float dist = 0; 585 ofile.write(reinterpret_cast<char *>(&dist), sizeof(float)); 586 587 ofile.write(reinterpret_cast<char *>(&mNumShapes), sizeof(int)); 588 589 // all shapes belong to this scene entity 590 for (int i = 0; i < mNumShapes; ++ i) 591 { 592 int shapeId = i; 593 ofile.write(reinterpret_cast<char *>(&shapeId), sizeof(int)); 594 } 595 596 return true; 597 } 598 #endif 599 600 601 bool ObjConverter::LoadMaterials(const std::string &matFileName) 602 { 603 FILE *file; 604 605 if ((file = fopen(matFileName.c_str(), "r")) == NULL) 606 { 607 return false; 608 } 609 610 int line = 0; 611 const int len = 10000; 612 char str[len]; 613 614 Material *currentMat = NULL; 615 616 617 while (fgets(str, len, file) != NULL) 618 { 619 //sscanf(str + 1, "%f %f %f", &x, &y, &z); 620 vector<string> strings; 621 622 char *next_token; 623 624 // extract the triples of the form v/t/n v/t/n ... 625 char *pch = strtok_s(str, " \n", &next_token); 626 627 while (pch) 628 { 629 string s(pch); 630 //s += "\n", 631 strings.push_back(s); 632 633 pch = strtok_s(NULL, " \n", &next_token); 634 } 635 636 cout << endl; 637 638 639 if ((strings.size() == 2) && (strcmp(strings[0].c_str(),"newmtl") == 0)) 640 { 641 currentMat = new Material(); 642 mMaterialTable[strings[1].c_str()] = currentMat; 643 } 644 645 if ((strings.size() == 2) && (strcmp(strings[0].c_str(),"map_Kd") == 0)) 646 { 647 TextureTable::const_iterator it = mTextureTable.find(strings[1]); 648 649 int id; 650 651 if (it == mTextureTable.end()) // parameter not found 652 { 653 mTextures.push_back(strings[1]); 654 id = (int)mTextures.size(); 655 mTextureTable[strings[1]] = id; 656 } 657 else 658 { 659 id = (*it).second; 660 } 661 662 currentMat->texture = id; 663 } 664 665 if ((strings.size() == 4) && (strcmp(strings[0].c_str(),"Kd") == 0)) 666 { 667 currentMat->rgb[0] = (float)atof(strings[1].c_str()); 668 currentMat->rgb[1] = (float)atof(strings[2].c_str()); 669 currentMat->rgb[2] = (float)atof(strings[3].c_str()); 670 } 671 672 ++ line; 673 } 674 675 return true; 676 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter.h
r3012 r3247 5 5 #include <string> 6 6 #include <vector> 7 #include <map> 7 8 8 /*struct SimpleVec 9 10 struct Material 9 11 { 10 SimpleVec() {} 11 SimpleVec(float _x, float _y, float _z): x(_x), y(_y), z(_z) {} 12 float rgb[3]; 13 int texture; 14 }; 12 15 13 float x, y, z; 14 };*/ 16 class Geometry; 15 17 16 18 typedef std::vector<SimpleVec> VertexArray; 17 19 typedef std::pair<float, float> Texcoord; 20 typedef std::map<std::string, Material *> MaterialTable; 21 typedef std::map<std::string, int> TextureTable; 22 23 typedef std::vector<std::string> TextureArray; 18 24 19 25 class ogzstream; … … 29 35 bool Convert(const std::string &inputFilename, 30 36 const std::string &outputFilename); 31 // const std::string textureFilename) const; 37 // const std::string textureFilename) const; 38 39 bool LoadMaterials(const std::string &matFileName); 32 40 33 41 ~ObjConverter(); … … 40 48 SimpleVec *mNormals; 41 49 Texcoord *mTexcoords; 50 Material *mMaterial; 42 51 43 52 int mVertexCount; … … 45 54 }; 46 55 56 typedef std::vector<Geometry *> GeometryArray; 57 47 58 void LoadShape(const VertexArray &faceVertices, 48 59 const VertexArray &faceNormals, 49 const std::vector<Texcoord> &faceTexcoords); 60 const std::vector<Texcoord> &faceTexcoords, 61 Material *mat); 50 62 51 63 void WriteGeometry(ogzstream &str, Geometry *geom); … … 55 67 56 68 57 std::vector<Geometry *> mGeometry; 69 MaterialTable mMaterialTable; 70 TextureTable mTextureTable; 71 72 TextureArray mTextures; 73 GeometryArray mGeometry; 58 74 59 75 int mNumShapes; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/main.cpp
r3146 r3247 14 14 15 15 cout << "converting obj to dem format" << endl; 16 17 if (!converter.LoadMaterials(model_path + argv[3])) 18 { 19 cerr << "loading materials failed" << endl; 20 21 std::cin.get(); 22 exit(0); 23 } 16 24 17 25 if (!converter.Convert(model_path + argv[1], model_path + argv[2])) … … 22 30 exit(0); 23 31 } 24 //std::cin.get(); 32 25 33 cout << "conversion successful" << endl; 34 cout << "press any key" << std::cin.get(); 26 35 27 36 return 0; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
r3246 r3247 8 8 9 9 #filename=vienna_full_hp 10 filename=city 10 11 useLODs=1 11 12 # shadow map size … … 23 24 visibilitySolution=vienna_full-8x3-pgv 24 25 26 useSkylightForIllum=0 25 27 26 28 … … 42 44 #keyForwardMotion=5.0f 43 45 #keyRotation=0.5f 44 #keyForwardMotion=20.0f46 keyForwardMotion=20.0f 45 47 keyRotation=1.5f 46 48 … … 59 61 ## powerplant options 60 62 61 filename=PowerPlantM63 #filename=PowerPlantM 62 64 63 keyForwardMotion=200.0f64 mouseMotion=1.0f;65 visibilitySolution=power-plant-2c-xx-1000b-pgv266 camPosition=-1320.57 -6306.34 360367 camDirection=0.292156 0.9556 0.038387865 #keyForwardMotion=200.0f 66 #mouseMotion=1.0f; 67 #visibilitySolution=power-plant-2c-xx-1000b-pgv2 68 #camPosition=-1320.57 -6306.34 3603 69 #camDirection=0.292156 0.9556 0.0383878 68 70 69 71 … … 109 111 110 112 # use full resolution ssao (vs. half resoltion) 111 ssaoUseFullResolution= 0113 ssaoUseFullResolution=1 112 114 # ssao kernel radius 113 115 #ssaoKernelRadius=8e-1f -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3246 r3247 1426 1426 { 1427 1427 mSampleIntensity = sampleIntensity; 1428 mRegenerateSamples = true; 1428 1429 } 1429 1430 … … 1432 1433 { 1433 1434 mKernelRadius = kernelRadius; 1435 mRegenerateSamples = true; 1434 1436 } 1435 1437 … … 1438 1440 { 1439 1441 mSsaoFilterRadius = ssaoFilterRadius; 1442 mRegenerateSamples = true; 1440 1443 } 1441 1444 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.cpp
r3235 r3247 172 172 173 173 QuadraticDiscSampleGenerator2D::QuadraticDiscSampleGenerator2D(int numSamples, float radius): 174 PoissonDiscSampleGenerator2D(numSamples, radius) 174 //PoissonDiscSampleGenerator2D(numSamples, radius) 175 RandomSampleGenerator2D(numSamples, radius) 175 176 {} 176 177 … … 193 194 #else 194 195 195 PoissonDiscSampleGenerator2D::Generate(samples); 196 //PoissonDiscSampleGenerator2D::Generate(samples); 197 RandomSampleGenerator2D::Generate(samples); 196 198 197 199 Sample2 *s = (Sample2 *)samples; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.h
r3230 r3247 78 78 with the distance 79 79 */ 80 class QuadraticDiscSampleGenerator2D: public PoissonDiscSampleGenerator2D 80 //class QuadraticDiscSampleGenerator2D: public PoissonDiscSampleGenerator2D 81 class QuadraticDiscSampleGenerator2D: public RandomSampleGenerator2D 81 82 { 82 83 public: -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3246 r3247 142 142 ViewCell *viewCell = NULL; 143 143 144 bool useSkylightForIllum = true; 145 144 146 static int globalVisibleId = 0; 145 147 … … 456 458 env.GetBoolParam(string("usePvs"), usePvs); 457 459 460 env.GetBoolParam(string("useSkylightForIllum"), useSkylightForIllum); 461 458 462 //env.GetStringParam(string("modelPath"), model_path); 459 463 //env.GetIntParam(string("numSssaoSamples"), numSsaoSamples); … … 488 492 cout << "use PVS: " << usePvs << endl; 489 493 cout << "visibilitySolution: " << visibilitySolution << endl; 490 494 cout << "useSkylightForIllum" << useSkylightForIllum << endl; 491 495 492 496 //cout << "model path: " << model_path << endl; … … 571 575 572 576 //LoadModel("fisch.dem", dynamicObjects); 573 //LoadModel("hbuddha.dem", dynamicObjects);574 577 575 578 //LoadModel("venusm.dem", dynamicObjects); … … 577 580 //LoadModel("toyplane2.dem", dynamicObjects); 578 581 //LoadModel("elephal.dem", dynamicObjects); 579 582 LoadModel("sibenik.dem", dynamicObjects); 583 584 #if 1 585 LoadModel("hbuddha.dem", dynamicObjects); 586 587 buddha = dynamicObjects.back(); 588 589 const Vector3 sceneCenter(470.398f, 240.364f, 181.7f); 590 //const Vector3 sceneCenter(470.398f, 240.364f, 180.3); 591 592 Matrix4x4 transl = TranslationMatrix(sceneCenter); 593 buddha->GetTransform()->SetMatrix(transl); 594 595 for (int i = 0; i < 10; ++ i) 596 { 597 SceneEntity *ent = new SceneEntity(*buddha); 598 resourceManager->AddSceneEntity(ent); 599 600 Vector3 offs = Vector3::ZERO(); 601 602 offs.x = RandomValue(.0f, 50.0f); 603 offs.y = RandomValue(.0f, 50.0f); 604 605 Vector3 newPos = sceneCenter + offs; 606 607 transl = TranslationMatrix(newPos); 608 Transform3 *transform = resourceManager->CreateTransform(transl); 609 610 ent->SetTransform(transform); 611 dynamicObjects.push_back(ent); 612 } 613 #endif 614 615 580 616 resourceManager->mUseNormalMapping = false; 581 617 resourceManager->mUseSpecialColors = false; 582 618 583 /*584 buddha = dynamicObjects.back();585 586 const Vector3 sceneCenter(470.398f, 240.364f, 181.7f);587 //const Vector3 sceneCenter(470.398f, 240.364f, 180.3);588 589 Matrix4x4 transl = TranslationMatrix(sceneCenter);590 buddha->GetTransform()->SetMatrix(transl);591 592 for (int i = 0; i < 10; ++ i)593 {594 SceneEntity *ent = new SceneEntity(*buddha);595 resourceManager->AddSceneEntity(ent);596 597 Vector3 offs = Vector3::ZERO();598 599 offs.x = RandomValue(.0f, 50.0f);600 offs.y = RandomValue(.0f, 50.0f);601 602 Vector3 newPos = sceneCenter + offs;603 604 transl = TranslationMatrix(newPos);605 Transform3 *transform = resourceManager->CreateTransform(transl);606 607 ent->SetTransform(transform);608 dynamicObjects.push_back(ent);609 }610 */611 619 612 620 /* int cityEntities = LoadModel("vienna_full_hp.dem", dynamicObjects); … … 942 950 Vector3 sunDiffuse; 943 951 944 #if 1 945 preetham->ComputeSunColor(lightDir, sunAmbient, sunDiffuse, !useHDRValues); 946 947 ambient[0] = sunAmbient.x; 948 ambient[1] = sunAmbient.y; 949 ambient[2] = sunAmbient.z; 950 951 diffuse[0] = sunDiffuse.x; 952 diffuse[1] = sunDiffuse.y; 953 diffuse[2] = sunDiffuse.z; 954 955 #else 956 957 ambient[0] = .2f; 958 ambient[1] = .2f; 959 ambient[2] = .2f; 960 961 diffuse[0] = 1.0f; 962 diffuse[1] = 1.0f; 963 diffuse[2] = 1.0f; 964 965 #endif 952 if (useSkylightForIllum) 953 { 954 preetham->ComputeSunColor(lightDir, sunAmbient, sunDiffuse, !useHDRValues); 955 956 ambient[0] = sunAmbient.x; 957 ambient[1] = sunAmbient.y; 958 ambient[2] = sunAmbient.z; 959 960 diffuse[0] = sunDiffuse.x; 961 diffuse[1] = sunDiffuse.y; 962 diffuse[2] = sunDiffuse.z; 963 } 964 else 965 { 966 967 ambient[0] = .2f; 968 ambient[1] = .2f; 969 ambient[2] = .2f; 970 971 diffuse[0] = 1.0f; 972 diffuse[1] = 1.0f; 973 diffuse[2] = 1.0f; 974 } 966 975 967 976 glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); … … 1088 1097 #endif 1089 1098 1090 1099 /* 1091 1100 ///////////////////////// 1092 1101 //-- update animations … … 1096 1105 1097 1106 Matrix4x4 rotMatrix = RotationZMatrix(rotAngle); 1098 dynamicObjects[ 1]->GetTransform()->MultMatrix(rotMatrix);1107 dynamicObjects[2]->GetTransform()->MultMatrix(rotMatrix); 1099 1108 1100 1109 motionPath->Move(0.01f); 1110 */ 1101 1111 } 1102 1112 … … 1189 1199 { 1190 1200 if (!viewCellsTree) LoadVisibilitySolution(); 1191 LoadPvs(); 1201 1202 LoadPvs(); 1192 1203 } 1193 1204 … … 1309 1320 FrameBufferObject::Release(); 1310 1321 1311 if (!deferredShader) deferredShader = 1312 new DeferredRenderer(texWidth, texHeight, camera, ssaoUseFullResolution); 1313 1322 if (!deferredShader) 1323 { 1324 deferredShader = 1325 new DeferredRenderer(texWidth, texHeight, camera, ssaoUseFullResolution); 1326 1327 deferredShader->SetKernelRadius(ssaoKernelRadius); 1328 deferredShader->SetSampleIntensity(ssaoSampleIntensity); 1329 deferredShader->SetSsaoFilterRadius(ssaoFilterRadius); 1330 } 1331 1314 1332 DeferredRenderer::SHADING_METHOD shadingMethod; 1315 1333 … … 1331 1349 deferredShader->SetShadingMethod(shadingMethod); 1332 1350 deferredShader->SetSamplingMethod(samplingMethod); 1333 deferredShader->SetKernelRadius(ssaoKernelRadius); 1334 deferredShader->SetSampleIntensity(ssaoSampleIntensity); 1335 deferredShader->SetSsaoFilterRadius(ssaoFilterRadius); 1351 1336 1352 deferredShader->SetUseTemporalCoherence(useTemporalCoherence); 1337 1353 //deferredShader->SetSortSamples(sortSamples); … … 1475 1491 ssaoKernelRadius *= 0.8f; 1476 1492 cout << "new ssao kernel radius: " << ssaoKernelRadius << endl; 1493 if (deferredShader) deferredShader->SetKernelRadius(ssaoKernelRadius); 1477 1494 break; 1478 1495 case '0': 1479 1496 ssaoKernelRadius *= 1.0f / 0.8f; 1497 if (deferredShader) deferredShader->SetKernelRadius(ssaoKernelRadius); 1480 1498 cout << "new ssao kernel radius: " << ssaoKernelRadius << endl; 1481 1499 break; 1482 1500 case 'n': 1483 1501 ssaoSampleIntensity *= 0.9f; 1502 if (deferredShader) deferredShader->SetSampleIntensity(ssaoSampleIntensity); 1484 1503 cout << "new ssao sample intensity: " << ssaoSampleIntensity << endl; 1485 1504 break; 1486 1505 case 'N': 1487 1506 ssaoSampleIntensity *= 1.0f / 0.9f; 1507 if (deferredShader) deferredShader->SetSampleIntensity(ssaoSampleIntensity); 1488 1508 cout << "new ssao sample intensity: " << ssaoSampleIntensity << endl; 1489 1509 break; 1490 1510 case 'o': 1491 1511 ssaoFilterRadius *= 0.9f; 1512 if (deferredShader) deferredShader->SetSsaoFilterRadius(ssaoFilterRadius); 1492 1513 cout << "new ssao filter radius: " << ssaoFilterRadius << endl; 1493 1514 break; 1494 1515 case 'O': 1495 1516 ssaoFilterRadius *= 1.0f / 0.9f; 1517 if (deferredShader) deferredShader->SetSsaoFilterRadius(ssaoFilterRadius); 1496 1518 cout << "new ssao filter radius: " << ssaoFilterRadius << endl; 1497 1519 break; … … 2587 2609 2588 2610 viewCellsTree = visLoader.Load(vis_filename, bvh); 2611 2612 if (!viewCellsTree) 2613 { 2614 cerr << "loading pvs failed" << endl; 2615 CleanUp(); 2616 exit(0); 2617 } 2589 2618 } 2590 2619 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3246 r3247 6 6 //-- ssao + gi parameters 7 7 8 //#define NUM_SAMPLES 88 #define NUM_SAMPLES 8 9 9 //#define NUM_SAMPLES 16 10 #define NUM_SAMPLES 2410 //#define NUM_SAMPLES 24 11 11 //#define NUM_SAMPLES 48 12 12 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
r3246 r3247 162 162 163 163 // the filtered ssao value 164 ao.x = DiscontinuityFilter(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, scale, bl, br, tl, tr);164 //ao.x = DiscontinuityFilter(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, scale, bl, br, tl, tr); 165 165 } 166 166 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3231 r3247 22 22 }; 23 23 24 24 // this function is inspired from the paper of shamulgaan in order 25 // to get a physical expression for the occlusion culling 25 26 inline float occlusionPower(float radius, float dist) 26 27 {
Note: See TracChangeset
for help on using the changeset viewer.