diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-02-28 17:10:14 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-02-28 18:15:50 +0300 |
commit | cd897c57f818a1159b7510e46f436183bffce9e0 (patch) | |
tree | db47aea4e236848de5c5d1950a92e66bd7594b56 /source/blender/makesdna/DNA_lightprobe_types.h | |
parent | 921c37bfa3108708cb6c2a6cd7c1b1a588be2d74 (diff) |
Fix T62040: Irradiance Volume broken
Was broken by 6a03199b50e02d57a50eb24441ef7be0b7e965ac.
Reintroducing the padding along with a few comment to not reproduce the
same errors.
Diffstat (limited to 'source/blender/makesdna/DNA_lightprobe_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_lightprobe_types.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h index d9fd22c51c8..f852b1f5a7f 100644 --- a/source/blender/makesdna/DNA_lightprobe_types.h +++ b/source/blender/makesdna/DNA_lightprobe_types.h @@ -115,14 +115,20 @@ enum { /* Needs to be there because written to file * with the lightcache. */ +/* IMPORTANT Padding in these structs is essential. It must match + * GLSL struct definition in lightprobe_lib.glsl. */ + +/* Must match CubeData. */ typedef struct LightProbeCache { float position[3], parallax_type; float attenuation_fac; float attenuation_type; + float _pad3[2]; float attenuationmat[4][4]; float parallaxmat[4][4]; } LightProbeCache; +/* Must match GridData. */ typedef struct LightGridCache { float mat[4][4]; /** Offset to the first irradiance sample in the pool. */ @@ -131,8 +137,8 @@ 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]; - float visibility_bias, visibility_bleed, visibility_range; + float increment_z[3], _pad4; + float visibility_bias, visibility_bleed, visibility_range, _pad5; } LightGridCache; /* ------ Eevee Lightcache ------- */ |