Fixing moving shadows of flames once again.
This commit is contained in:
parent
bedc836cb0
commit
5f779ea3d5
@ -272,7 +272,7 @@ void main()
|
||||
for(int i = 0; i<lightCount; i++) {
|
||||
vec3 lightPos = vec3(0.0, 0.0, 0.0);
|
||||
if (isFlame[i] == true) {
|
||||
lightPos = vec3(lightSources[i].x + 0.75*movement.y , lightSources[i].y, lightSources[i].z + 0.75*movement.x);
|
||||
lightPos = vec3(lightSources[i].x - 0.75*movement.y , lightSources[i].y, lightSources[i].z + 0.75*movement.x);
|
||||
}
|
||||
else {
|
||||
lightPos = lightSources[i];
|
||||
|
@ -398,7 +398,7 @@ void Graphics::render(double time)
|
||||
glm::vec3 position = glm::vec3(0.0f);
|
||||
if (std::get<0>(renderQueue.at(i_pointlight))->isFlame()) {
|
||||
position = std::get<0>(renderQueue.at(i_pointlight))->getPosition();
|
||||
position = glm::vec3(position.x + 0.75f*wind.x, position.y, position.z + 0.75f*wind.y);
|
||||
position = glm::vec3(position.x - 0.75f*wind.y, position.y, position.z + 0.75f*wind.x);
|
||||
}
|
||||
else {
|
||||
position = std::get<0>(renderQueue.at(i_pointlight))->getPosition();
|
||||
|
Loading…
Reference in New Issue
Block a user