Add LightColor to imgui menu

This commit is contained in:
4VRDriver
2020-09-17 13:55:29 +02:00
parent 065ec8d7ae
commit ba5188e50b
10 changed files with 44 additions and 15 deletions

View File

@@ -11,6 +11,11 @@ PointLight::PointLight(ShaderProgram *shaderProgram)
void PointLight::update() {
// Only temp
glm::vec3 diffuseColor = lightColor * glm::vec3(1.0f);
glm::vec3 ambientColor = diffuseColor * glm::vec3(0.1f);
glm::vec3 specularColor = lightColor * glm::vec3(1.0f);
shaderProgram->bind();
shaderProgram->setUniform((_getStructMemberName() + "isActive").c_str(), isActive);
@@ -41,6 +46,11 @@ DirectionalLight::DirectionalLight(ShaderProgram *shaderProgram)
void DirectionalLight::update() {
// Only temp
glm::vec3 diffuseColor = lightColor * glm::vec3(1.0f);
glm::vec3 ambientColor = diffuseColor * glm::vec3(0.1f);
glm::vec3 specularColor = lightColor * glm::vec3(1.0f);
shaderProgram->bind();
shaderProgram->setUniform("u_directionalLight.isActive", isActive);