Changeset 8473 in orxonox.OLD for branches/water
- Timestamp:
- Jun 15, 2006, 3:59:09 PM (19 years ago)
- Location:
- branches/water/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/water/src/lib/graphics/effects/fog_effect.cc
r8362 r8473 71 71 this->localTimer = 0; 72 72 73 this->fogMode = GL_ EXP2;73 this->fogMode = GL_LINEAR; 74 74 this->fogDensity = 0.001; 75 75 this->fogStart = 0; 76 this->fogEnd = 5000;77 this->colorVector = Vector(0. 7, 0.7, 0.7);76 this->fogEnd = 1000; 77 this->colorVector = Vector(0.0f, 0.0f, 0.7f); 78 78 79 79 return true; -
branches/water/src/world_entities/environments/mapped_water.cc
r8467 r8473 20 20 #include "state.h" 21 21 22 //#include "fog_effect.h"23 24 22 25 23 CREATE_FACTORY(MappedWater, CL_MAPPED_WATER); … … 34 32 this->loadParams(root); 35 33 36 PRINTF(0)("MaxTextureUnits: %i\n", Material::getMaxTextureUnits());34 //PRINTF(0)("MaxTextureUnits: %i\n", Material::getMaxTextureUnits()); 37 35 38 36 // TODO rename texture to reflection texture … … 134 132 135 133 this->shader->deactivateShader(); 134 135 136 this->fog = new FogEffect(); 137 fog->setFogColor(0.1f, 0.2f, 0.4f); 138 fog->setFogRange(0.0f, 500.0f); 139 fog->setFogDensity(0.03f); 136 140 } 137 141 … … 140 144 delete shader; 141 145 delete cam_uni; 146 delete fog; 142 147 } 143 148 … … 158 163 glTranslatef(this->waterPos.x,this->waterPos.y,this->waterPos.z); 159 164 160 mat.unselect();165 /////????//mat.unselect(); 161 166 mat.select(); 162 167 … … 215 220 mat.unselect(); 216 221 217 if( this->waterPos.y)222 if(pos.y < this->waterPos.y) 218 223 { 219 224 // draw some fog 220 //FogEffect::activate(); 225 this->fog->activate(); 226 } 227 else 228 { 229 this->fog->deactivate(); 221 230 } 222 231 … … 230 239 this->move2 = this->move * this->kNormalMapScale; 231 240 this->refrUV = this->g_WaterUV; 232 this->normalUV = this->g_WaterUV * this->kNormalMapScale; 241 this->normalUV = this->g_WaterUV * this->kNormalMapScale; 233 242 } 234 243 -
branches/water/src/world_entities/environments/mapped_water.h
r8467 r8473 7 7 #define _MAPPED_WATER_H 8 8 9 /* INCLUDES */10 9 #include "world_entity.h" 11 10 #include "material.h" 12 11 #include "shader.h" 12 #include "effects/fog_effect.h" 13 13 14 14 15 class MappedWater : public WorldEntity … … 51 52 Shader::Uniform* cam_uni; //!< uniform that is used for the camera position 52 53 54 FogEffect* fog; 55 53 56 }; 54 57
Note: See TracChangeset
for help on using the changeset viewer.