Beispiel #1
0
  void CloudLayer::_registerCloudLayer(Ogre::Pass* CloudLayerPass)
  {
    _unregister();

    CloudLayerPass->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
    CloudLayerPass->setCullingMode(Ogre::CULL_NONE);
    CloudLayerPass->setLightingEnabled(false);
    CloudLayerPass->setDepthWriteEnabled(false);

    CloudLayerPass->setVertexProgram("SkyX_Clouds_VP");
    if (mSkyX->getLightingMode() == SkyX::LM_LDR)
    {
      CloudLayerPass->setFragmentProgram("SkyX_Clouds_LDR_FP");
    }
    else
    {
      CloudLayerPass->setFragmentProgram("SkyX_Clouds_HDR_FP");
    }

    // TODO
    CloudLayerPass->createTextureUnitState(
        "Clouds.png")->setTextureAddressingMode(
          Ogre::TextureUnitState::TAM_WRAP);
    CloudLayerPass->createTextureUnitState(
        "CloudsNormal.png")->setTextureAddressingMode(
          Ogre::TextureUnitState::TAM_WRAP);
    CloudLayerPass->createTextureUnitState(
        "CloudsTile.png")->setTextureAddressingMode(
          Ogre::TextureUnitState::TAM_WRAP);

    mCloudLayerPass = CloudLayerPass;

    _updatePassParameters();
    _updateInternalPassParameters();
  }
	void CloudLayer::_registerCloudLayer()
	{
		_unregister();

		mRd.blendMode = GetApp()->GetBlendMode();
		mRd.cull = GetApp()->cullNone;
		mRd.depthMode = GetApp()->noDepthWrite;

		if (mSkyX->getLightingMode() == VCloudSkySystem::LM_LDR)
		{

		}
		else 
		{

		}
		mDiffuseTex = mSkyX->mDiffuseTex;
		mNormalTex = mSkyX->mNormalTex;
		mTileTex = mSkyX->mTileTex;
		

		_updatePassParameters();
		_updateInternalPassParameters();
	}