Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help changing my light color. * SetupSceneLights ( ) void SceneManager::SetupSceneLights ( ) { / / Define properties of the first light /

i need help changing my light color.
* SetupSceneLights()
void SceneManager::SetupSceneLights(){
// Define properties of the first light
// Define properties of the second light
// Pass light properties to the shade
m_pShaderManager->setVec3Value("lightSources[0].position", 3.0f,14.0f,0.0f);
m_pShaderManager->setVec3Value("lightSources[0].ambientColor", 0.01f,0.01f,0.01f);
m_pShaderManager->setVec3Value("lightSources[0].diffuseColor", 0.4f,0.4f,0.4f);
m_pShaderManager->setVec3Value("lightSources[0].specularColor", 0.0f,0.0f,0.0f);
m_pShaderManager->setFloatValue("lightSources[0].focalStrength", 32.0f);
m_pShaderManager->setFloatValue("lightSources[0].specularIntensity", 0.05f);
m_pShaderManager->setVec3Value("lightSources[1].position", -3.0f,14.0f,0.0f);
m_pShaderManager->setVec3Value("lightSources[1].ambientColor", 0.01f,0.01f,0.01f);
m_pShaderManager->setVec3Value("lightSources[1].diffuseColor", 0.4f,0.4f,0.4f);
m_pShaderManager->setVec3Value("lightSources[1].specularColor", 0.0f,0.0f,0.0f);
m_pShaderManager->setFloatValue("lightSources[1].focalStrength", 32.0f);
m_pShaderManager->setFloatValue("lightSources[1].specularIntensity", 0.05f);
m_pShaderManager->setVec3Value("lightSources[2].position", 0.6f,5.0f,6.0f);
m_pShaderManager->setVec3Value("lightSources[2].ambientColor", 0.01f,0.01f,0.01f);
m_pShaderManager->setVec3Value("lightSources[2].diffuseColor", 0.3f,0.3f,0.3f);
m_pShaderManager->setVec3Value("lightSources[2].specularColor", 0.3f,0.3f,0.3f);
m_pShaderManager->setFloatValue("lightSources[2].focalStrength", 12.0f);
m_pShaderManager->setFloatValue("lightSources[2].specularIntensity", 0.5f);
// Enable lighting in the shader
m_pShaderManager->setBoolValue("bUseLighting", true);}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions

Question

Are you at your best around 8 or 9 AM? Yes No

Answered: 1 week ago

Question

How would you describe Mark Zuckerberg as a team leader?

Answered: 1 week ago