Changeset 3233


Ignore:
Timestamp:
12/24/08 01:36:00 (15 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp

    r3232 r3233  
    13181318        sCgDOFProgram->SetTexture(i ++, colorsTex); 
    13191319        sCgDOFProgram->SetArray2f(i ++, (float *)dofSamples, NUM_DOF_TABS); 
    1320         sCgDOFProgram->SetValue1f(i ++, sceneRange); 
     1320        sCgDOFProgram->SetValue1f(i ++, mCamera->GetFar() - mCamera->GetNear()); 
    13211321 
    13221322        DrawQuad(sCgDOFProgram); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.cpp

    r3232 r3233  
    2727void PoissonDiscSampleGenerator2D::Generate(float *samples) const 
    2828{ 
    29         // this is a hacky poisson sampling generator which does random dart-throwing on a disc. 
    30         // as a savety criterium, the min distance requirement is relaxed if we are not  
     29        // Poisson disc sampling generator using relaxation  
     30        // dart-throwing as proposed by McCool et al. 
     31        // the min distance requirement is relaxed if we are not  
    3132        // able to place any dart for a number of tries 
    32         // the solution is a possion sampling with respect to the adjusted min distance 
    33         // better solutions have been proposed, i.e., using hierarchical sampling 
    34         const int maxTries = 1000; 
     33        // the solution is a possion sampling with respect  
     34        // to the adjusted min distance 
     35        // this sampling scheme has the benefit that it is hierarchical  
     36        int maxTries = 1000; 
    3537        const float f_reduction = 0.9f; 
    36  
    37  
     38         
    3839        float r[2]; 
    3940 
    4041        // generates poisson distribution on disc 
    41         // start with some threshold. best case: all samples lie on the circumference 
    42         //const float minDist = 2.0f * mRadius / sqrt((float)mNumSamples); 
     42        // start with some threshold 
     43        // best case: all samples lie on the circumference of circle 
     44          
    4345        const float eps = 0.2f; 
    4446        const float minDist = 2.0f * mRadius * M_PI * (1.0f - eps) / (float)mNumSamples; 
     
    105107        } 
    106108 
    107         //cout << "minDist after= " << sqrt(sqrMinDist) << " #tries: " << totalTries << endl; 
     109        cout << "minDist after= " << sqrt(sqrMinDist) << " #tries: " << totalTries << endl; 
    108110} 
    109111 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.cpp

    r3219 r3233  
    454454 
    455455        transform2LispSM.x[0][0] =  1.0f; 
    456         transform2LispSM.x[1][2] =  -1.0f; // y => -z 
     456        transform2LispSM.x[1][2] = -1.0f; // y => -z 
    457457        transform2LispSM.x[2][1] =  1.0f; // z => y 
    458458        transform2LispSM.x[3][3] =  1.0f; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.h

    r3062 r3233  
    2626public: 
    2727        /** Constructor taking the scene boundig box and the current camera.  
    28                 The shadow map has resolution size squared. 
     28                The shadow map is quadratic and has resolution mapSize squared. 
    2929        */ 
    30         ShadowMap(DirectionalLight *light, int size, const AxisAlignedBox3 &sceneBox, PerspectiveCamera *cam); 
     30        ShadowMap(DirectionalLight *light, int mapSize, const AxisAlignedBox3 &sceneBox, PerspectiveCamera *cam); 
    3131 
    3232        ~ShadowMap(); 
     
    3434        */ 
    3535        void ComputeShadowMap(RenderTraverser *traverser, const Matrix4x4 &projView); 
     36        /** Renders the scene from shadow view using conventional shading. 
     37        */ 
     38        void RenderShadowView(RenderTraverser *renderer, const Matrix4x4 &projView); 
    3639        /** Returns computed shadow color texture. 
    3740        */ 
     
    4851        */ 
    4952        void GetTextureMatrix(Matrix4x4 &m) const; 
    50         /** Return shadow size. 
     53        /** Returns shadow map size. 
    5154        */ 
    5255        int GetSize() const { return mSize; } 
     
    5457        */ 
    5558        PerspectiveCamera *GetShadowCamera() const { return mShadowCam; } 
    56         /** Renders the scene from shadow view using conventional shading. 
    57         */ 
    58         void RenderShadowView(RenderTraverser *renderer, const Matrix4x4 &projView); 
     59 
    5960        /** Draws LispSM intersection body B and the used light frustrum 
    6061        */ 
Note: See TracChangeset for help on using the changeset viewer.