Changeset 2983 for GTP/trunk/App/Demos
- Timestamp:
- 10/01/08 00:51:12 (16 years ago)
- 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 101 101 102 102 103 void SkyPreetham::RenderSkyDome(const Vector3 &sunDir, Camera *camera, RenderState *state) 103 void SkyPreetham::RenderSkyDome(const Vector3 &sunDir, 104 Camera *camera, 105 RenderState *state, 106 bool scaleToRange) 104 107 { 105 108 pair<float, float> sun_theta; … … 134 137 cgGLEnableProfile(RenderState::sCgFragmentProfile); 135 138 cgGLBindProgram(sCgMrtFragmentSkyDomeProgram); 136 137 // can use tone mapping 139 140 } 141 142 if (!scaleToRange) 143 { 144 // use tone mapping 138 145 cgGLSetParameter1f(sMultiplierParam, 1.0f); 139 } 140 else 146 } 147 else 141 148 { 142 149 // no tone mapping => scale … … 266 273 267 274 268 void SkyPreetham::ComputeSunColor(const Vector3 &sunDir, Vector3 &ambient, Vector3 &diffuse, bool scaleToRange) const 275 void SkyPreetham::ComputeSunColor(const Vector3 &sunDir, 276 Vector3 &ambient, 277 Vector3 &diffuse, 278 bool scaleToRange) const 269 279 { 270 280 // sunDir is sun direction -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SkyPreetham.h
r2982 r2983 22 22 virtual ~SkyPreetham(); 23 23 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); 25 25 26 26 static void Init(CGcontext context); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r2982 r2983 838 838 839 839 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; 843 842 844 843 Vector3 sunAmbient; … … 2022 2021 state.SetRenderPassType(RenderState::DEFERRED); 2023 2022 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); 2025 2027 2026 2028 cgGLDisableProfile(RenderState::sCgVertexProfile);
Note: See TracChangeset
for help on using the changeset viewer.