- Timestamp:
- 01/13/06 19:20:27 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp
r534 r537 68 68 Vector3 &viewPoint, 69 69 Vector3 &direction, 70 const float probability, 70 71 VssRayContainer &vssRays 71 72 ) … … 148 149 objectB, 149 150 objectA, 150 mPass 151 mPass, 152 probability 151 153 ); 152 154 vssRays.push_back(vssRay); … … 159 161 objectA, 160 162 objectB, 161 mPass 163 mPass, 164 probability 162 165 ); 163 166 vssRays.push_back(vssRay); … … 551 554 //int s = Min(mSamplesPerPass, mInitialSamples); 552 555 int s = mInitialSamples; 553 556 557 float probability = 1.0f/mInitialSamples; 554 558 for (int k=0; k < s; k++) { 555 559 … … 561 565 Vector3 direction = InitialGetDirection(viewpoint, mViewSpaceBox); 562 566 563 sampleContributions = CastRay(viewpoint, direction, mVssRays);567 sampleContributions = CastRay(viewpoint, direction, probability, mVssRays); 564 568 565 569 … … 694 698 mViewCellsManager->GetViewPoint(viewpoint); 695 699 Vector3 direction = GetDirection(viewpoint, mViewSpaceBox); 696 rays.push_back(SimpleRay(viewpoint, direction)); 700 rays.push_back(SimpleRay(viewpoint, direction, 1.0f)); 701 rays.mSumProbabilities+=1.0f; 697 702 } 698 703 } else { 699 704 num = GenerateImportanceRays(rssTree, num, rays); 700 705 } 701 702 706 707 rays.NormalizeProbabilities(); 708 703 709 for (int i=0; i < rays.size(); i++) 704 CastRay(rays[i].mOrigin, rays[i].mDirection, vssRays);710 CastRay(rays[i].mOrigin, rays[i].mDirection, rays[i].mProbability, vssRays); 705 711 706 712
Note: See TracChangeset
for help on using the changeset viewer.