mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +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);
|
float expandedRadius = light.radius * (1.0f + SCALE_EXPANSION);
|
||||||
if (glm::distance(eyePoint, glm::vec3(light.position)) < expandedRadius) {
|
if (glm::distance(eyePoint, glm::vec3(light.position)) < expandedRadius) {
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
glTranslatef(0.0f, 0.0f, -1.0f);
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
@ -304,6 +305,7 @@ void DeferredLightingEffect::render() {
|
||||||
float edgeRadius = expandedRadius / glm::cos(light.cutoff);
|
float edgeRadius = expandedRadius / glm::cos(light.cutoff);
|
||||||
if (glm::distance(eyePoint, glm::vec3(light.position)) < edgeRadius) {
|
if (glm::distance(eyePoint, glm::vec3(light.position)) < edgeRadius) {
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
glTranslatef(0.0f, 0.0f, -1.0f);
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
Loading…
Reference in a new issue