Fix T62040: Irradiance Volume broken
Was broken by 6a03199b50
.
Reintroducing the padding along with a few comment to not reproduce the
same errors.
This commit is contained in:
parent
921c37bfa3
commit
cd897c57f8
Notes:
blender-bot
2023-02-14 09:48:25 +01:00
Referenced by issue #62040, Irradiance Volume broken
|
@ -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 ------- */
|
||||
|
|
Loading…
Reference in New Issue