Changeset 8781 in orxonox.OLD for branches/atmospheric_engine
- Timestamp:
- Jun 26, 2006, 1:33:56 PM (19 years ago)
- Location:
- branches/atmospheric_engine/src/lib/graphics/effects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc
r8733 r8781 71 71 this->planetRadius = 1500; 72 72 this->divs = 50; 73 74 this->skyColor = Vector(0.0f, 0.0f, 0.8f); 75 this->cloudColor = Vector(0.8f, 0.8f, 0.8f); 73 76 74 77 noise3DTexSize = 128; … … 90 93 0, GL_RGBA, GL_UNSIGNED_BYTE, noise3DTexPtr); 91 94 92 skydome = new Skydome();93 skydome->setTexture(noise3DTexName);95 this->skydome = new Skydome(); 96 this->skydome->setTexture(noise3DTexName); 94 97 95 98 shader = new Shader(ResourceManager::getInstance()->getDataDir() + "/shaders/cloud.vert", … … 99 102 100 103 Shader::Uniform(shader, "Noise").set(0); 101 //Shader::Uniform(shader, "SkyColor").set(0.0f, 0.0f, 0.8f);102 Shader::Uniform(shader, "CloudColor").set(0.8f, 0.8f, 0.8f);103 104 104 105 offset = new Shader::Uniform(shader, "Offset"); 105 106 skycolor = new Shader::Uniform(shader, "SkyColor"); 106 skycolor->set(0.0f, 0.0f, 0.0f);107 cloudcolor = new Shader::Uniform(shader, "CloudColor"); 107 108 108 109 this->shader->deactivateShader(); 109 110 110 skydome->setShader(shader);111 this->skydome->setShader(shader); 111 112 } 112 113 … … 118 119 LoadParam(root, "speed", this, CloudEffect, setAnimationSpeed); 119 120 LoadParam(root, "scale", this, CloudEffect, setCloudScale); 121 LoadParam(root, "cloudcolor", this, CloudEffect, setCloudColor); 122 LoadParam(root, "skycolor", this, CloudEffect, setSkyColor); 120 123 121 124 LoadParam(root, "planetRadius", this, CloudEffect, setPlanetRadius); … … 138 141 this->shader->activateShader(); 139 142 Shader::Uniform(shader, "Scale").set(this->scale); 143 this->skycolor->set(skyColor.x, skyColor.y, skyColor.z); 144 this->cloudcolor->set(cloudColor.x, cloudColor.y, cloudColor.z); 140 145 this->shader->deactivateShader(); 141 146 … … 164 169 this->shader->activateShader(); 165 170 offset->set(0.0f, 0.0f, offsetZ); 166 skycolor->set(offsetZ/10, 0.0f, 0.0f);167 171 this->shader->deactivateShader(); 168 172 } -
branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h
r8771 r8781 64 64 { this->scale = scale; } 65 65 66 inline void setCloudColor(float colorX, float colorY, float colorZ) 67 { this->cloudColor = Vector(colorX, colorY, colorZ); } 68 69 inline void setSkyColor(float colorX, float colorY, float colorZ) 70 { this->skyColor = Vector(colorX, colorY, colorZ); } 71 66 72 inline void setPlanetRadius(float planetRadius) 67 73 { this->planetRadius = planetRadius; } … … 75 81 virtual void draw() const; 76 82 virtual void tick(float dt); 83 84 77 85 78 86 void make3DNoiseTexture(); … … 89 97 bool cloudActivate; 90 98 float animationSpeed; 99 Vector cloudColor; 100 Vector skyColor; 91 101 92 102 // Material cloudMaterial; … … 97 107 Shader::Uniform* offset; 98 108 Shader::Uniform* skycolor; 109 Shader::Uniform* cloudcolor; 99 110 float offsetZ; 100 111 float scale;
Note: See TracChangeset
for help on using the changeset viewer.