Changeset 3360 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Timestamp:
- 04/17/09 17:37:38 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3352 r3360 674 674 FilterSsao(fbo); 675 675 CombineSsao(fbo); 676 676 677 break; 677 678 case GI: -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3359 r3360 551 551 camera = new PerspectiveCamera(winWidth / winHeight, fov); 552 552 camera->SetNear(nearDist); 553 camera->SetFar(1 000);553 camera->SetFar(1e6f); 554 554 555 555 camera->SetDirection(camDir); … … 621 621 //resourceManager->mUseNormalMapping = true; 622 622 //resourceManager->mUseNormalMapping = false; 623 624 623 resourceManager->mUseSpecialColors = true; 625 624 … … 632 631 633 632 if (0) LoadPompeiiFloor(); 634 633 #if 1 635 634 636 635 #if 0 … … 647 646 VertexArray positions; 648 647 648 // for buddha (lowres) 649 649 /*positions.push_back(Vector3(6.07307, 8.20723, 6.62)); 650 650 positions.push_back(Vector3(-17.1935, 11.1687, 8.8781)); 651 651 positions.push_back(Vector3(1.50032, 31.1943, 19.1f));*/ 652 652 653 positions.push_back(Vector3(6.07307, 8.20723, 4.6f)); 654 positions.push_back(Vector3(-17.1935, 11.1687, 6.8f)); 655 positions.push_back(Vector3(1.50032, 31.1943, 17.6f)); 653 // for happy buddha 654 //positions.push_back(Vector3(6.07307, 8.20723, 4.6f)); 655 //positions.push_back(Vector3(-17.1935, 11.1687, 6.8f)); 656 //positions.push_back(Vector3(1.50032, 31.1943, 17.6f)); 657 658 // for dragon 659 //positions.push_back(Vector3(6.07307, 8.20723, 5.0f)); 660 positions.push_back(Vector3(0, 0, -0.8)); 656 661 657 662 #endif … … 661 666 662 667 //LoadModel("hbuddha.dem", dynamicObjects); 663 //LoadModel("horse.dem", dynamicObjects); 664 LoadModel("happy.dem", dynamicObjects); 668 LoadModel("horse.dem", dynamicObjects); 669 //LoadModel("happy.dem", dynamicObjects); 670 //LoadModel("dragon.dem", dynamicObjects); 665 671 //LoadModel("torus.dem", dynamicObjects); 666 672 //LoadModel("venusm.dem", dynamicObjects); … … 680 686 681 687 // hack: second buddha 682 dynamicObjects[2]->GetTransform()->MultMatrix(rotMatrix);683 dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix);684 688 dynamicObjects[0]->GetTransform()->MultMatrix(rotMatrix); 685 689 dynamicObjects[0]->GetTransform()->MultMatrix(scaleMatrix); 686 dynamicObjects[1]->GetTransform()->MultMatrix(scaleMatrix); 687 dynamicObjects[2]->GetTransform()->MultMatrix(scaleMatrix); 690 691 //dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 692 //dynamicObjects[1]->GetTransform()->MultMatrix(scaleMatrix); 693 694 //dynamicObjects[2]->GetTransform()->MultMatrix(rotMatrix); 695 //dynamicObjects[2]->GetTransform()->MultMatrix(scaleMatrix); 688 696 689 697 cout << "dynamic objects: " << (int)dynamicObjects.size() << endl; 698 699 CreateAnimation(positions[0]); 700 #endif 690 701 691 702 // hack … … 722 733 723 734 // set far plane based on scene extent 724 farDist = 10.0f * Magnitude(bvh->GetBox().Diagonal()); 735 //farDist = 10.0f * Magnitude(bvh->GetBox().Diagonal()); 736 farDist = 1000.0f; 725 737 camera->SetFar(farDist); 726 738 … … 739 751 /// the turbitity of the sky (from clear to hazy, use <3 for clear sky) 740 752 preetham = new SkyPreetham(turbitity, skyDome); 741 742 CreateAnimation(positions[0]);743 753 744 754 … … 1606 1616 break; 1607 1617 case '9': 1608 ssaoKernelRadius *= 0.8f;1618 ssaoKernelRadius *= .8f; 1609 1619 cout << "new ssao kernel radius: " << ssaoKernelRadius << endl; 1610 1620 if (deferredShader) deferredShader->SetKernelRadius(ssaoKernelRadius); 1611 1621 break; 1612 1622 case '0': 1613 ssaoKernelRadius *= 1.0f / 0.8f;1623 ssaoKernelRadius *= 1.0f / .8f; 1614 1624 if (deferredShader) deferredShader->SetKernelRadius(ssaoKernelRadius); 1615 1625 cout << "new ssao kernel radius: " << ssaoKernelRadius << endl; 1616 1626 break; 1617 1627 case 'n': 1618 ssaoSampleIntensity *= 0.9f;1628 ssaoSampleIntensity *= .9f; 1619 1629 if (deferredShader) deferredShader->SetSampleIntensity(ssaoSampleIntensity); 1620 1630 cout << "new ssao sample intensity: " << ssaoSampleIntensity << endl; 1621 1631 break; 1622 1632 case 'N': 1623 ssaoSampleIntensity *= 1.0f / 0.9f;1633 ssaoSampleIntensity *= 1.0f / .9f; 1624 1634 if (deferredShader) deferredShader->SetSampleIntensity(ssaoSampleIntensity); 1625 1635 cout << "new ssao sample intensity: " << ssaoSampleIntensity << endl; … … 1671 1681 case 'T': 1672 1682 useTemporalCoherence = !useTemporalCoherence; 1683 cout << "using temporal coherence " << useTemporalCoherence << endl; 1673 1684 break; 1674 1685 case 'a': -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3356 r3360 6 6 //-- ssao + gi parameters 7 7 8 #define NUM_PRECOMPUTED_SAMPLES 8124 8 //#define NUM_PRECOMPUTED_SAMPLES 8124 9 #define NUM_PRECOMPUTED_SAMPLES 4096 10 //#define NUM_PRECOMPUTED_SAMPLES 2048 9 11 10 12 //#define NUM_SAMPLES 8 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3353 r3360 40 40 41 41 // hack: prevent to shade the sky 42 #if 042 #if 1 43 43 if (color.w > DEPTH_THRESHOLD) 44 44 { -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
r3168 r3360 102 102 //pix.id = glstate.fog.color.xyz; 103 103 // the offset to the world pos from old frame 104 //pix.offsVec = float3(0,0,0); 104 105 pix.offsVec = IN.oldWorldPos.xyz - IN.worldPos.xyz; 105 106 … … 124 125 // the offset to the world pos from old frame 125 126 pix.offsVec = IN.oldWorldPos.xyz - IN.worldPos.xyz; 127 //pix.offsVec = float3(0,0,0); 126 128 127 129 return pix;
Note: See TracChangeset
for help on using the changeset viewer.