Changeset 527


Ignore:
Timestamp:
01/12/06 15:25:56 (18 years ago)
Author:
mattausch
Message:
 
Location:
trunk/VUT/GtpVisibilityPreprocessor
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj

    r512 r527  
    135135                        </File> 
    136136                        <File 
     137                                RelativePath="..\src\dual_depth.cg"> 
     138                        </File> 
     139                        <File 
    137140                                RelativePath="..\src\Environment.cpp"> 
    138141                        </File> 
  • trunk/VUT/GtpVisibilityPreprocessor/src/GlRenderer.cpp

    r526 r527  
    1313static CGcontext sCgContext = NULL; 
    1414static CGprogram sCgFragmentProgram = NULL; 
    15  
    16 static CGparameter sCgKdParam = NULL; 
    17 static CGparameter sCgModelViewProjParam = NULL; 
    18  
    19  
    20 static CGprofile sCgFragmentProfile = CG_PROFILE_FP30; 
     15static CGprofile sCgFragmentProfile;// = CG_PROFILE_FP30; 
     16 
     17//static CGparameter sCgKdParam = NULL; 
     18//static CGparameter sCgModelViewProjParam = NULL; 
    2119 
    2220GLuint depthMap; 
     
    157155  sCgContext = cgCreateContext(); 
    158156 
    159   /*sCgFragmentProgram = cgCreateProgramFromFile(sCgContext,             
     157  sCgFragmentProfile = cgGLGetLatestProfile(CG_GL_FRAGMENT); 
     158 
     159  sCgFragmentProgram = cgCreateProgramFromFile(sCgContext,               
    160160                                                                                           CG_SOURCE, "../src/dual_depth.cg", 
    161161                                                                                           sCgFragmentProfile, 
    162162                                                                                           NULL,  
    163                                                                                            NULL);*/ 
     163                                                                                           NULL); 
    164164} 
    165165 
     
    585585        glShadeModel(GL_FLAT); 
    586586        glDisable(GL_LIGHTING); 
     587        // needed to kill fragments 
     588        glEnable(GL_ALPHA_TEST); 
     589        glAlphaFunc(GL_GREATER, 0); 
    587590 
    588591        // assumes that the beam is constructed and contains kd-tree nodes 
  • trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp

    r516 r527  
    522522        mViewCellsManager->SetViewSpaceBox(mKdTree->GetBox()); 
    523523  } 
    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  } 
    525531 
    526532  RssTree *rssTree = NULL; 
     
    645651  rssTree->SetPass(mPass); 
    646652   
     653  /// compute view cell contribution of rays if view cells manager already constructed 
     654  mViewCellsManager->ComputeSampleContributions(mVssRays); 
     655 
    647656  if (mUseImportanceSampling) { 
    648657         
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.cpp

    r520 r527  
    7070} 
    7171 
     72 
     73int ViewCellsManager::Construct(VssRayContainer &rays) 
     74{ 
     75        return 0; 
     76} 
    7277 
    7378bool ViewCellsManager::LoadViewCells(const string filename, ObjectContainer *objects) 
  • trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellsManager.h

    r519 r527  
    5353        virtual ~ViewCellsManager(); 
    5454 
     55        /** Constructs view cells container taking a preprocessor 
     56                @returns construction rays. 
     57        */ 
     58        int Construct(VssRayContainer &rays); 
     59 
    5560        /** Constructs view cell container with a given number of samples. 
    5661        */ 
  • trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp

    r520 r527  
    403403 
    404404  //-- load view cells from file if requested 
    405   // load now because otherwise bounding box is messed up 
    406405  if (mLoadViewCells) 
    407   { 
     406  {      
     407          // load now because otherwise bounding box not correct 
    408408          mViewCellsManager->LoadViewCells(mViewCellsFilename, &mObjects); 
    409409  } 
  • trunk/VUT/GtpVisibilityPreprocessor/src/dual_depth.cg

    r525 r527  
    2525         
    2626        // the depth buffer      
    27         float4 depth = tex2Dproj(shadowMap, IN.SMTexCoord); 
     27        float4 depth = tex2Dproj(shadowMap, IN.depthTexCoord); 
    2828        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; 
    3334 
    3435        return OUT; 
Note: See TracChangeset for help on using the changeset viewer.