diff options
author | mano-wii <germano.costa@ig.com.br> | 2018-10-20 00:22:02 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2018-10-20 00:23:26 +0300 |
commit | 8e3a680ebe398cf24a2b06aa0e0a7f09492f87bf (patch) | |
tree | 2e519c7be6bfb4a7c522437aff0f310862d75489 /source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl | |
parent | 39ad5c3ef1ea4ff0b9cce03f97c30dd3828fe168 (diff) |
Fix Eevee Reflection CubeMap and Irradiance Volume on some Intel gpus
When you pass a struct as a parameter to a function, the qualifier "layout(column_major)" is lost.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl index d19773aec05..164b6da68bf 100644 --- a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl @@ -338,26 +338,24 @@ void CLOSURE_NAME( /* Starts at 1 because 0 is world probe */ for (int i = 1; ACCUM.a < 0.999 && i < prbNumRenderCube && i < MAX_PROBE; ++i) { - CubeData cd = probes_data[i]; - - float fade = probe_attenuation_cube(cd, worldPosition); + float fade = probe_attenuation_cube(i, worldPosition); if (fade > 0.0) { #ifdef CLOSURE_GLOSSY if (!(ssrToggle && ssr_id == outputSsrId)) { - vec3 spec = probe_evaluate_cube(float(i), cd, worldPosition, spec_dir, roughness); + vec3 spec = probe_evaluate_cube(i, worldPosition, spec_dir, roughness); accumulate_light(spec, fade, spec_accum); } #endif #ifdef CLOSURE_CLEARCOAT - vec3 C_spec = probe_evaluate_cube(float(i), cd, worldPosition, C_spec_dir, C_roughness); + vec3 C_spec = probe_evaluate_cube(i, worldPosition, C_spec_dir, C_roughness); accumulate_light(C_spec, fade, C_spec_accum); #endif #ifdef CLOSURE_REFRACTION - vec3 trans = probe_evaluate_cube(float(i), cd, refr_pos, refr_dir, roughnessSquared); + vec3 trans = probe_evaluate_cube(i, refr_pos, refr_dir, roughnessSquared); accumulate_light(trans, fade, refr_accum); #endif } @@ -458,7 +456,7 @@ void CLOSURE_NAME( GridData gd = grids_data[i]; vec3 localpos; - float fade = probe_attenuation_grid(gd, worldPosition, localpos); + float fade = probe_attenuation_grid(gd, grids_data[i].localmat, worldPosition, localpos); if (fade > 0.0) { vec3 diff = probe_evaluate_grid(gd, worldPosition, bent_normal, localpos); |