deleted red ambient

This commit is contained in:
xkamikoo 2021-01-27 01:35:39 +01:00
parent 283e9fd53f
commit 1f1294c688
2 changed files with 7 additions and 8 deletions

View File

@ -42,7 +42,7 @@ void main()
vec3 diffuse = pointLights[i].color * diff * distance * pointLights[i].intensity;
vec3 specular = spec * pointLights[i].color * (pointLights[i].intensity/dist);
vec3 texture = vec3(textureColor.x, textureColor.y, textureColor.z) * pointLights[i].color;
vec3 texture = vec3(textureColor.x, textureColor.y, textureColor.z); // * pointLights[i].color;
fragColor += mix(texture,texture*diffuse+vec3(1)*specular,0.9);
}

View File

@ -60,7 +60,6 @@ glm::mat4 cameraMatrix, perspectiveMatrix;
glm::vec3 sunPos = glm::vec3(10.0f, 0.0f, -5.0f);
glm::vec3 sunPos2 = glm::vec3(25.0f, -1.0f, 10.0f);
glm::vec3 engineLight = cameraPos + cameraDir * 0.6f + glm::vec3(0, -0.25f, 0);
struct Light {
@ -349,24 +348,24 @@ void init()
Light l1;
l1.position = sunPos;
l1.color = glm::vec3(0.8f, 0.8f, 0.7f);
l1.intensity = 3;
l1.intensity = 2;
lights.push_back(l1);
Light l2;
l2.position = sunPos2;
l2.color = glm::vec3(0.5f, 0.5f, 0.5f);
l2.intensity = 3;
l2.intensity = 2;
lights.push_back(l2);
Light l3;
l3.position = engineLight;
l3.color = glm::vec3(1.0f, -0.0f, 0.0f);
l3.position = glm::vec3(0);
l3.color = glm::vec3(1.0f, 0.0f, 0.0f);
l3.intensity = 0.0001;
lights.push_back(l3);
Light l4;
l4.position = engineLight;
l4.color = glm::vec3(1.0f, -0.0f, 0.0f);
l4.position = glm::vec3(0);
l4.color = glm::vec3(1.0f, 0.0f, 0.0f);
l4.intensity = 0.0001;
lights.push_back(l4);