90 CloudLayerPass->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
91 CloudLayerPass->setCullingMode(Ogre::CULL_NONE);
92 CloudLayerPass->setLightingEnabled(
false);
93 CloudLayerPass->setDepthWriteEnabled(
false);
95 CloudLayerPass->setVertexProgram(
"SkyX_Clouds_VP");
98 CloudLayerPass->setFragmentProgram(
"SkyX_Clouds_LDR_FP");
102 CloudLayerPass->setFragmentProgram(
"SkyX_Clouds_HDR_FP");
106 CloudLayerPass->createTextureUnitState(
"Clouds.png")->setTextureAddressingMode(Ogre::TextureUnitState::TAM_WRAP);
107 CloudLayerPass->createTextureUnitState(
"CloudsNormal.png")->setTextureAddressingMode(Ogre::TextureUnitState::TAM_WRAP);
108 CloudLayerPass->createTextureUnitState(
"CloudsTile.png")->setTextureAddressingMode(Ogre::TextureUnitState::TAM_WRAP);
140 ->setNamedConstant(
"uWindDirection", WindDirection_, 1, 2);
227 ->getTechnique(0)->createPass());
231 bool changeOrder =
false;
257 return NewCloudLayer;
266 delete (*CloudLayersIt);
277 delete (*CloudLayersIt);
289 ->getTechnique(0)->createPass());
299 (*CloudLayersIt)->_unregister();
308 (*CloudLayersIt)->_unregister();
316 (*CloudLayersIt)->_updateInternalPassParameters();
const Options & getOptions() const
Get current options.
ColorGradient mSunGradient
void _unregister()
Unregister cloud pass.
SkyX * mSkyX
SkyX parent pointer.
Options mOptions
Cloud layer options.
Ogre::Pass * mCloudLayerPass
Cloud layer pass.
CloudLayer(SkyX *s)
Default onstructor.
void _updateInternalPassParameters()
Update internal cloud pass parameters.
ColorGradient mAmbientGradient
Ambient and Sun color gradients.
void _registerCloudLayer(Ogre::Pass *CloudLayerPass)
Register layer.
void _updatePassParameters()
Update cloud pass parameters.
~CloudsManager()
Destructor.
void unregister(CloudLayer *cl)
Unregister cloud layer.
void unregisterAll()
Unregister all cloud layers.
void update()
Update cloud layers.
CloudLayer * add(const CloudLayer::Options &o)
Add a cloud layer.
void registerAll()
Register all.
CloudsManager(SkyX *h)
Constructor.
std::vector< CloudLayer * >::iterator CloudLayersIt
Cloud layers iterator.
SkyX * mSkyX
SkyX parent pointer.
std::vector< CloudLayer * > mCloudLayers
Cloud layers std::vector.
void removeAll()
Remove all cloud layers.
void remove(CloudLayer *cl)
Remove the specified cloud layer.
const Ogre::Vector3 getColor(const Ogre::Real &p) const
Get color value.
std::pair< Ogre::Vector3, Ogre::Real > ColorFrame
Color frame type definition ColorFrame.first: Colour value ColorFrame.second: Position in the gradien...
void addCFrame(const ColorFrame &CFrame)
Add color frame.
virtual Ogre::Vector3 getSunDirection()=0
Get sun direction.
const Ogre::String getSkydomeMaterialName() const
Get skydome material name.
AtmosphereManager * getAtmosphereManager()
Get atmosphere manager.
@ LM_LDR
Low dynamic range.
const Ogre::Real & _getTimeOffset() const
Get time offset.
const LightingMode & getLightingMode() const
Get lighting mode.
GPUManager * getGPUManager()
Get GPU manager.
Controller * getController() const
Get current controller.
Ogre::Vector2 WindDirection
Wind direction.
Ogre::Real Height
Cloud layer height.
Ogre::Real VolumetricDisplacement
Volumetric displacement(For volumetric effects on the gpu)
Ogre::Real DistanceAttenuation
Distance attenuation.
Ogre::Real DetailAttenuation
Detail attenuation.
Ogre::Real TimeMultiplier
Time multiplier.
Ogre::Real Scale
Cloud layer scale.
Ogre::Real HeightVolume
Cloud layer height volume(For volumetric effects on the gpu)