diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-06-02 17:27:19 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-06-03 16:15:06 +0300 |
commit | 14df74ea8b60c0feb8b333faad257c57f691c015 (patch) | |
tree | 0c54bc8f3c99f2884a3fa5279ce3fe3a935c37b1 /source/blender/makesdna/DNA_lightprobe_types.h | |
parent | 060c462f3ae3a38ad0a8a4833844e954a6bcc23a (diff) |
EEVEE: LightCache: Port baking
Some things differs from old implementation.
- Object visibility is filtered correctly without using a visibility
callback (which is to be removed).
The implementation is also more high level using less low level tricks.
A dedicated LightProbeView is created for each lightprobe cubeface to
render using all pipeline (deferred and forward).
There is still a few things not working.
Diffstat (limited to 'source/blender/makesdna/DNA_lightprobe_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_lightprobe_types.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h index 48e3c44e2c9..b887122f805 100644 --- a/source/blender/makesdna/DNA_lightprobe_types.h +++ b/source/blender/makesdna/DNA_lightprobe_types.h @@ -123,7 +123,9 @@ typedef struct LightProbeCache { float position[3], parallax_type; float attenuation_fac; float attenuation_type; - float _pad3[2]; + /* Used during baking. */ + int probe_index; + int is_ready; float attenuationmat[4][4]; float parallaxmat[4][4]; } LightProbeCache; @@ -137,8 +139,10 @@ typedef struct LightGridCache { /** World space vector between 2 opposite cells. */ float increment_x[3], attenuation_bias; float increment_y[3], level_bias; - float increment_z[3], _pad4; - float visibility_bias, visibility_bleed, visibility_range, _pad5; + float increment_z[3], is_ready; + float visibility_bias, visibility_bleed, visibility_range; + /* Used during baking. */ + int probe_index; } LightGridCache; /* These are used as UBO data. They need to be aligned to size of vec4. */ @@ -207,6 +211,8 @@ enum { LIGHTCACHE_INVALID = (1 << 8), /** The data present in the cache is valid but unusable on this GPU. */ LIGHTCACHE_NOT_USABLE = (1 << 9), + /** Used by baking cache to keep reflections black. */ + LIGHTCACHE_NO_REFLECTION = (1 << 10), }; /* EEVEE_LightCacheTexture->data_type */ |