Commit: cd897c57f818a1159b7510e46f436183bffce9e0
Author: Clément Foucault
Date:   Thu Feb 28 15:10:14 2019 +0100
Branches: master
https://developer.blender.org/rBcd897c57f818a1159b7510e46f436183bffce9e0

Fix T62040: Irradiance Volume broken

Was broken by 6a03199b50e02d57a50eb24441ef7be0b7e965ac.

Reintroducing the padding along with a few comment to not reproduce the
same errors.

===================================================================

M       source/blender/makesdna/DNA_lightprobe_types.h

===================================================================

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 ------- */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to