diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-11-14 17:54:10 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-11-15 20:16:30 +0300 |
commit | d0b0e7efed709613e53effa3e0381312310a117f (patch) | |
tree | 8539c4a7c8c1811164291ddecff78c429ed402ad /source | |
parent | f3074b96d6fe748900d062c7dc3f51f37f06fc5a (diff) |
Eevee: Cleanup: Fix wrong sun area light power calculation
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_lights.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c index 962cb7c2033..5336e197d02 100644 --- a/source/blender/draw/engines/eevee/eevee_lights.c +++ b/source/blender/draw/engines/eevee/eevee_lights.c @@ -661,8 +661,7 @@ static void eevee_light_setup(Object *ob, EEVEE_Light *evli) // power = M_PI * M_PI * 0.78; /* XXX : Empirical, Fit cycles power */ } else { - power = 1.0f / (4.0f * evli->radius * evli->radius * M_PI * M_PI) * /* 1/(r²*Pi) */ - 12.5f; /* XXX : Empirical, Fit cycles power */ + power = 1.0f / (evli->radius * evli->radius * M_PI); /* 1/(r²*Pi) */ /* Make illumation power closer to cycles for bigger radii. Cycles uses a cos^3 term that we cannot reproduce * so we account for that by scaling the light power. This function is the result of a rough manual fitting. */ power *= 1.0f + evli->radius * evli->radius * 0.5f; |