mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
Depth value tweak.
This commit is contained in:
parent
52d0b15979
commit
a0e0c47701
1 changed files with 2 additions and 0 deletions
|
@ -256,6 +256,7 @@ void DeferredLightingEffect::render() {
|
|||
float expandedRadius = light.radius * (1.0f + SCALE_EXPANSION);
|
||||
if (glm::distance(eyePoint, glm::vec3(light.position)) < expandedRadius) {
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0f, 0.0f, -1.0f);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
|
@ -304,6 +305,7 @@ void DeferredLightingEffect::render() {
|
|||
float edgeRadius = expandedRadius / glm::cos(light.cutoff);
|
||||
if (glm::distance(eyePoint, glm::vec3(light.position)) < edgeRadius) {
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0f, 0.0f, -1.0f);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
|
|
Loading…
Reference in a new issue