Changeset 8867 in orxonox.OLD for branches/mountain_lake/src/world_entities/environments/mapped_water.cc
- Timestamp:
- Jun 28, 2006, 4:08:57 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mountain_lake/src/world_entities/environments/mapped_water.cc
r8866 r8867 63 63 delete shineSize_uni; 64 64 delete shineStrength_uni; 65 delete reflStrength_uni; 65 66 delete refr_uni; 66 67 } … … 75 76 this->setWaterSize(100, 100); 76 77 this->setWaterUV(9); 77 this->setWaterFlow(0.08 );78 this->setWaterFlow(0.08f); 78 79 this->setLightPos(0, 10, 0); 79 80 this->setWaterAngle(0); … … 81 82 this->setWaterColor(0.1f, 0.2f, 0.4f); 82 83 this->setShineSize(128); 83 this->setShineStrength(0.7); 84 this->setShineStrength(0.7f); 85 this->setReflStrength(1.0f); 84 86 this->setRefraction(0.009f); 85 87 … … 160 162 shineStrength_uni = new Shader::Uniform(shader, "shineStrength"); 161 163 shineStrength_uni->set(this->shineStrength); 164 // Set the variable "reflStrength" 165 reflStrength_uni = new Shader::Uniform(shader, "reflStrength"); 166 reflStrength_uni->set(this->reflStrength); 162 167 // Set the variable "refraction" 163 168 refr_uni = new Shader::Uniform(shader, "kRefraction"); … … 227 232 // Set the variable "shine" 228 233 shineStrength_uni->set(this->shineStrength); 234 235 this->shader->deactivateShader(); 236 } 237 238 /** 239 * @brief resets the strength of the reflection in the Shader 240 * @param strength new value for the strength of the reflection 241 */ 242 void MappedWater::resetReflStrength(float strength) 243 { 244 this->shader->activateShader(); 245 this->reflStrength = strength; 246 247 // Set the variable "shine" 248 reflStrength_uni->set(this->reflStrength); 229 249 230 250 this->shader->deactivateShader(); … … 281 301 LoadParam(root, "shinesize", this, MappedWater, setShineSize); 282 302 LoadParam(root, "shinestrength", this, MappedWater, setShineStrength); 303 LoadParam(root, "reflstrength", this, MappedWater, setReflStrength); 283 304 LoadParam(root, "refraction", this, MappedWater, setRefraction); 284 305 }
Note: See TracChangeset
for help on using the changeset viewer.