Showing the changes to libraries/render-utils/src/DeferredLightingEffect.cpp (1 of 5 files). Show all
Unified · Split
| @@ -303,8 +303,8 @@ void DeferredLightingEffect::addSpotLight(const glm::vec3& position, float radiu · 302 unmodified lines | ||
| 303 | 303 | lp->setPosition(position); |
| 304 | 304 | lp->setDirection(direction); |
| 305 | 305 | lp->setMaximumRadius(radius); |
| 306 | − lp->setSpotCone(cutoff); | |
| 307 | − lp->setSpotConeExponent(exponent); | |
| 306 | + lp->setSpotAngle(cutoff); | |
| 307 | + lp->setSpotExponent(exponent); | |
| 308 | 308 | lp->setColor(diffuse); |
| 309 | 309 | lp->setIntensity(1.0f); |
| 310 | 310 | lp->setType(model::Light::SPOT); |
| @@ -527,7 +527,7 @@ void DeferredLightingEffect::render() { · 216 unmodified lines | ||
| 527 | 527 | glPushMatrix(); |
| 528 | 528 | |
| 529 | 529 | float expandedRadius = light->getMaximumRadius() * (1.0f + SCALE_EXPANSION); |
| 530 | − float edgeRadius = expandedRadius / glm::cos(light->getSpotConeAngle()); | |
| 530 | + float edgeRadius = expandedRadius / glm::cos(light->getSpotAngle()); | |
| 531 | 531 | if (glm::distance(eyePoint, glm::vec3(light->getPosition())) < edgeRadius + nearRadius) { |
| 532 | 532 | glLoadIdentity(); |
| 533 | 533 | glTranslatef(0.0f, 0.0f, -1.0f); |
| @@ -547,7 +547,7 @@ void DeferredLightingEffect::render() { · 13 unmodified lines | ||
| 547 | 547 | glm::vec3 axis = glm::axis(spotRotation); |
| 548 | 548 | glRotatef(glm::degrees(glm::angle(spotRotation)), axis.x, axis.y, axis.z); |
| 549 | 549 | glTranslatef(0.0f, 0.0f, -light->getMaximumRadius() * (1.0f + SCALE_EXPANSION * 0.5f)); |
| 550 | − geometryCache->renderCone(expandedRadius * glm::tan(light->getSpotConeAngle()), | |
| 550 | + geometryCache->renderCone(expandedRadius * glm::tan(light->getSpotAngle()), | |
| 551 | 551 | expandedRadius, 32, 1); |
| 552 | 552 | } |
| 553 | 553 | |