deleted red ambient
This commit is contained in:
parent
283e9fd53f
commit
1f1294c688
@ -42,7 +42,7 @@ void main()
|
|||||||
vec3 diffuse = pointLights[i].color * diff * distance * pointLights[i].intensity;
|
vec3 diffuse = pointLights[i].color * diff * distance * pointLights[i].intensity;
|
||||||
vec3 specular = spec * pointLights[i].color * (pointLights[i].intensity/dist);
|
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);
|
fragColor += mix(texture,texture*diffuse+vec3(1)*specular,0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
src/main.cpp
13
src/main.cpp
@ -60,7 +60,6 @@ glm::mat4 cameraMatrix, perspectiveMatrix;
|
|||||||
|
|
||||||
glm::vec3 sunPos = glm::vec3(10.0f, 0.0f, -5.0f);
|
glm::vec3 sunPos = glm::vec3(10.0f, 0.0f, -5.0f);
|
||||||
glm::vec3 sunPos2 = glm::vec3(25.0f, -1.0f, 10.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 {
|
struct Light {
|
||||||
@ -349,24 +348,24 @@ void init()
|
|||||||
Light l1;
|
Light l1;
|
||||||
l1.position = sunPos;
|
l1.position = sunPos;
|
||||||
l1.color = glm::vec3(0.8f, 0.8f, 0.7f);
|
l1.color = glm::vec3(0.8f, 0.8f, 0.7f);
|
||||||
l1.intensity = 3;
|
l1.intensity = 2;
|
||||||
lights.push_back(l1);
|
lights.push_back(l1);
|
||||||
|
|
||||||
Light l2;
|
Light l2;
|
||||||
l2.position = sunPos2;
|
l2.position = sunPos2;
|
||||||
l2.color = glm::vec3(0.5f, 0.5f, 0.5f);
|
l2.color = glm::vec3(0.5f, 0.5f, 0.5f);
|
||||||
l2.intensity = 3;
|
l2.intensity = 2;
|
||||||
lights.push_back(l2);
|
lights.push_back(l2);
|
||||||
|
|
||||||
Light l3;
|
Light l3;
|
||||||
l3.position = engineLight;
|
l3.position = glm::vec3(0);
|
||||||
l3.color = glm::vec3(1.0f, -0.0f, 0.0f);
|
l3.color = glm::vec3(1.0f, 0.0f, 0.0f);
|
||||||
l3.intensity = 0.0001;
|
l3.intensity = 0.0001;
|
||||||
lights.push_back(l3);
|
lights.push_back(l3);
|
||||||
|
|
||||||
Light l4;
|
Light l4;
|
||||||
l4.position = engineLight;
|
l4.position = glm::vec3(0);
|
||||||
l4.color = glm::vec3(1.0f, -0.0f, 0.0f);
|
l4.color = glm::vec3(1.0f, 0.0f, 0.0f);
|
||||||
l4.intensity = 0.0001;
|
l4.intensity = 0.0001;
|
||||||
lights.push_back(l4);
|
lights.push_back(l4);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user