Пример #1
0
  void GodRaysManager::update(const Ogre::Real& timeSinceLastFrame)
  {
    if(!mCreated || !mHydrax->_isCurrentFrameUnderwater())
    {
      return;
    }

    mPerlin->update(timeSinceLastFrame);
    _updateRays();
    _updateProjector();

    if(mObjectsIntersections)
    {
      _updateMaterialsParameters();
      mProjectorRTT->getBuffer()->getRenderTarget()->update();
    }
  }
Пример #2
0
    void UnderWaterGodRay::Render(const Vec3 & vWaterPosition)
    {
        mWaterPosition = vWaterPosition;

        _updateProjector();

        if (!mEnable)
             return ;

        float dtime = Engine::Instance()->GetFrameTime();
        mPerlin->update(dtime);

        _updateRays();

        RenderSystem * render = RenderSystem::Instance();
        RenderTarget * rt = render->GetRenderTarget(0);

        _renderRay();

        render->SetRenderTarget(0, rt);

        _blend();
    }