EEVEE: Lights: Add Volume and diffuse light power slider

This adds 2 new sliders for light objects that modulates the diffuse
light and the volume light intensities.

This also changes the way volume light is computed using point lamp
representation. We use "Point Light Attenuation Without Singularity"
from Cem Yuksel instead of the usual inverse square law.
This commit is contained in:
2021-03-19 12:07:23 +01:00
parent fb3e5b7f98
commit 884f934a85
12 changed files with 100 additions and 42 deletions

View File

@@ -484,11 +484,12 @@ typedef struct EEVEE_RenderPassData {
/* ************ LIGHT UBO ************* */
typedef struct EEVEE_Light {
float position[3], invsqrdist;
float color[3], spec;
float color[3], invsqrdist_volume;
float spotsize, spotblend, radius, shadow_id;
float rightvec[3], sizex;
float upvec[3], sizey;
float forwardvec[3], light_type;
float diff, spec, volume, _pad0[1];
} EEVEE_Light;
/* Special type for elliptic area lights, matches lamps_lib.glsl */