Changeset 2983


Ignore:
Timestamp:
10/01/08 00:51:12 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
3 edited

Legend:

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

    r2982 r2983  
    101101 
    102102 
    103 void SkyPreetham::RenderSkyDome(const Vector3 &sunDir, Camera *camera, RenderState *state) 
     103void SkyPreetham::RenderSkyDome(const Vector3 &sunDir,  
     104                                                                Camera *camera,  
     105                                                                RenderState *state,  
     106                                                                bool scaleToRange) 
    104107{ 
    105108        pair<float, float> sun_theta; 
     
    134137                cgGLEnableProfile(RenderState::sCgFragmentProfile); 
    135138                cgGLBindProgram(sCgMrtFragmentSkyDomeProgram); 
    136                  
    137                 // can use tone mapping 
     139 
     140        } 
     141 
     142        if (!scaleToRange) 
     143        {        
     144                // use tone mapping 
    138145                cgGLSetParameter1f(sMultiplierParam, 1.0f); 
    139         }        
    140         else  
     146        } 
     147        else 
    141148        { 
    142149                // no tone mapping => scale 
     
    266273 
    267274 
    268 void SkyPreetham::ComputeSunColor(const Vector3 &sunDir, Vector3 &ambient, Vector3 &diffuse, bool scaleToRange) const 
     275void SkyPreetham::ComputeSunColor(const Vector3 &sunDir,  
     276                                                                  Vector3 &ambient,  
     277                                                                  Vector3 &diffuse, 
     278                                                                  bool scaleToRange) const 
    269279{ 
    270280        // sunDir is sun direction 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SkyPreetham.h

    r2982 r2983  
    2222        virtual ~SkyPreetham(); 
    2323 
    24         void RenderSkyDome(const CHCDemoEngine::Vector3 &sunDir, CHCDemoEngine::Camera *camera, CHCDemoEngine::RenderState *state); 
     24        void RenderSkyDome(const CHCDemoEngine::Vector3 &sunDir, CHCDemoEngine::Camera *camera, CHCDemoEngine::RenderState *state, bool scaleToRange); 
    2525 
    2626        static void Init(CGcontext context); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r2982 r2983  
    838838         
    839839 
    840         const bool useToneMapping =  
    841                 (renderMethod == RENDER_DEPTH_PASS_DEFERRED) || 
    842                 (renderMethod == RENDER_DEFERRED); 
     840        //const bool useToneMapping = (renderMethod == RENDER_DEPTH_PASS_DEFERRED) || (renderMethod == RENDER_DEFERRED); 
     841        const bool useToneMapping = false; 
    843842 
    844843        Vector3 sunAmbient; 
     
    20222021                state.SetRenderPassType(RenderState::DEFERRED); 
    20232022 
    2024         preetham->RenderSkyDome(-light->GetDirection(), camera, &state); 
     2023        //const bool useToneMapping = (renderMethod == RENDER_DEPTH_PASS_DEFERRED) || (renderMethod == RENDER_DEFERRED); 
     2024        const bool useToneMapping = false; 
     2025 
     2026        preetham->RenderSkyDome(-light->GetDirection(), camera, &state, !useToneMapping); 
    20252027 
    20262028        cgGLDisableProfile(RenderState::sCgVertexProfile); 
Note: See TracChangeset for help on using the changeset viewer.