void FogDemo::Update(const GameTime& gameTime)
	{
		UpdateAmbientLight(gameTime);
		UpdateDirectionalLight(gameTime);
		UpdateSpecularLight(gameTime);
		mProxyModel->Update(gameTime);
	}
	void TransparencyMappingDemo::Update(const GameTime& gameTime)
	{
		UpdateAmbientLight(gameTime);
		UpdateDirectionalLight(gameTime);
		UpdateSpecularLight(gameTime);
		mProxyModel->Update(gameTime);
	}
	void TransparencyDemo::Update(const GameTime& gameTime)
	{
		if (!Camera::CameraControlFlag)
		{
			UpdateAmbientLight(gameTime);
			UpdateDirectionalLight(gameTime);
			UpdateSpecularLight(gameTime);
		}
		mProxyModel->Update(gameTime);
	}
Beispiel #4
0
/*
===================
idPlayerView::RenderPlayerView
===================
*/
void idPlayerView::RenderPlayerView( idUserInterface *hud )
{
	const renderView_t *view = player->GetRenderView();

	if(g_skipViewEffects.GetBool())
	{
		SingleView( hud, view );
	} else {

		/*if ( player->GetInfluenceMaterial() || player->GetInfluenceEntity() ) {
		InfluenceVision( hud, view );
		} else if ( gameLocal.time < dvFinishTime ) {
		DoubleVision( hud, view, dvFinishTime - gameLocal.time );
		} else {*/

		// greebo: For underwater effects, use the Doom3 Doubleview
		if (static_cast<idPhysics_Player*>(player->GetPlayerPhysics())->GetWaterLevel() >= WATERLEVEL_HEAD)
		{
			DoubleVision(hud, view, cv_tdm_underwater_blur.GetInteger());
		}
		else
		{
			// Do not postprocess the HUD
			// 			if ( r_bloom_hud.GetBool() || !r_bloom.GetBool() ) // If HUD blooming is enabled or bloom is disabled
			// 			{
			// 				SingleView( hud, view );
			// 			}
			// 			else
			{
				SingleView( hud, view, false );
			}
		}
		//}

		// Bloom related - J.C.Denton
		/* Update  post-process */
		this->m_postProcessManager.Update();

		ScreenFade();
	}

	player->DrawHUD(hud);


	// TDM Ambient Method checking. By Dram
	// Modified by JC Denton
	if ( cv_ambient_method.IsModified() ) // If the ambient method option has changed
	{
		UpdateAmbientLight();
	}
}
	void SpecularLightingDemo::Update(const GameTime & gameTime)
	{
		static float angle = 0.0f;

		if (mAnimationEnabled)
		{
			angle += gameTime.ElapsedGameTimeSeconds().count() * ModelRotationRate;
			XMStoreFloat4x4(&mWorldMatrix, XMMatrixRotationY(angle));
		}

		if (mKeyboard != nullptr && mKeyboard->WasKeyPressedThisFrame(Keys::Space))
		{
			ToggleAnimation();
		}

		if (mGamePad != nullptr)
		{
			auto& gamePadState = mGamePad->CurrentState();
			if (gamePadState.IsConnected())
			{
				if (mGamePad->WasButtonPressedThisFrame(GamePadButtons::Start))
				{
					ToggleGamePadControls();
				}

				if (mGamePad->WasButtonPressedThisFrame(GamePadButtons::LeftStick))
				{
					ToggleAnimation();
				}

				UpdateAmbientLight(gameTime);
				UpdateSpecularLight(gameTime);
				UpdateDirectionalLight(gameTime, gamePadState);
			}
		}

		mProxyModel->Update(gameTime);
	}
 void BlinnPhongDemo::Update(GameTime gametime)
 {
     UpdateAmbientLight(gametime);
     UpdateDirectionalLight(gametime);
     UpdateSpecularLight(gametime);
 }