Changeset 527 for trunk/VUT/GtpVisibilityPreprocessor/src
- Timestamp:
- 01/12/06 15:25:56 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/GlRenderer.cpp
r526 r527 13 13 static CGcontext sCgContext = NULL; 14 14 static CGprogram sCgFragmentProgram = NULL; 15 16 static CGparameter sCgKdParam = NULL; 17 static CGparameter sCgModelViewProjParam = NULL; 18 19 20 static CGprofile sCgFragmentProfile = CG_PROFILE_FP30; 15 static CGprofile sCgFragmentProfile;// = CG_PROFILE_FP30; 16 17 //static CGparameter sCgKdParam = NULL; 18 //static CGparameter sCgModelViewProjParam = NULL; 21 19 22 20 GLuint depthMap; … … 157 155 sCgContext = cgCreateContext(); 158 156 159 /*sCgFragmentProgram = cgCreateProgramFromFile(sCgContext, 157 sCgFragmentProfile = cgGLGetLatestProfile(CG_GL_FRAGMENT); 158 159 sCgFragmentProgram = cgCreateProgramFromFile(sCgContext, 160 160 CG_SOURCE, "../src/dual_depth.cg", 161 161 sCgFragmentProfile, 162 162 NULL, 163 NULL); */163 NULL); 164 164 } 165 165 … … 585 585 glShadeModel(GL_FLAT); 586 586 glDisable(GL_LIGHTING); 587 // needed to kill fragments 588 glEnable(GL_ALPHA_TEST); 589 glAlphaFunc(GL_GREATER, 0); 587 590 588 591 // assumes that the beam is constructed and contains kd-tree nodes -
trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp
r516 r527 522 522 mViewCellsManager->SetViewSpaceBox(mKdTree->GetBox()); 523 523 } 524 524 525 //-- load view cells from file if requested 526 if (mLoadViewCells) 527 { 528 // load now because otherwise bounding box not correct 529 mViewCellsManager->LoadViewCells(mViewCellsFilename, &mObjects); 530 } 525 531 526 532 RssTree *rssTree = NULL; … … 645 651 rssTree->SetPass(mPass); 646 652 653 /// compute view cell contribution of rays if view cells manager already constructed 654 mViewCellsManager->ComputeSampleContributions(mVssRays); 655 647 656 if (mUseImportanceSampling) { 648 657 -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp
r520 r527 70 70 } 71 71 72 73 int ViewCellsManager::Construct(VssRayContainer &rays) 74 { 75 return 0; 76 } 72 77 73 78 bool ViewCellsManager::LoadViewCells(const string filename, ObjectContainer *objects) -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.h
r519 r527 53 53 virtual ~ViewCellsManager(); 54 54 55 /** Constructs view cells container taking a preprocessor 56 @returns construction rays. 57 */ 58 int Construct(VssRayContainer &rays); 59 55 60 /** Constructs view cell container with a given number of samples. 56 61 */ -
trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp
r520 r527 403 403 404 404 //-- load view cells from file if requested 405 // load now because otherwise bounding box is messed up406 405 if (mLoadViewCells) 407 { 406 { 407 // load now because otherwise bounding box not correct 408 408 mViewCellsManager->LoadViewCells(mViewCellsFilename, &mObjects); 409 409 } -
trunk/VUT/GtpVisibilityPreprocessor/src/dual_depth.cg
r525 r527 25 25 26 26 // the depth buffer 27 float4 depth = tex2Dproj(shadowMap, IN. SMTexCoord);27 float4 depth = tex2Dproj(shadowMap, IN.depthTexCoord); 28 28 float test = IN.depthTexCoord.z / IN.depthTexCoord.w; 29 30 float shadow; 31 shadow = (test < depth.x) ? 1.0 : 0.0; 32 OUT.color = localcolor * shadow * IN.color1; 29 // reject by alpha test 30 if (test < depth.x) 31 col[4] = 0; 32 33 //OUT.color = localcolor * shadow * IN.color1; 33 34 34 35 return OUT;
Note: See TracChangeset
for help on using the changeset viewer.