From 7dd0be9554ae7a728ded1a95d4709a93b68301b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 11 Mar 2020 17:12:01 +0100 Subject: EEVEE: Replace octahedron reflection probe by cubemap array We implement cubemap array support for EEVEE's lightcache reflection probes. This removes stretched texels and bottom hemisphere seams artifacts caused by the octahedral projection previously used. This introduce versioning code for the lightcache which will discard any lightcache version that is not compatible. Differential Revision: https://developer.blender.org/D7066 --- source/blender/draw/engines/eevee/eevee_shaders.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/draw/engines/eevee/eevee_shaders.c') diff --git a/source/blender/draw/engines/eevee/eevee_shaders.c b/source/blender/draw/engines/eevee/eevee_shaders.c index 2d91e4bb4bd..50b7c5c5f97 100644 --- a/source/blender/draw/engines/eevee/eevee_shaders.c +++ b/source/blender/draw/engines/eevee/eevee_shaders.c @@ -88,6 +88,7 @@ extern char datatoc_lightprobe_planar_downsample_vert_glsl[]; extern char datatoc_irradiance_lib_glsl[]; extern char datatoc_lightprobe_lib_glsl[]; extern char datatoc_octahedron_lib_glsl[]; +extern char datatoc_cubemap_lib_glsl[]; /* Velocity Resolve */ extern char datatoc_effect_velocity_resolve_frag_glsl[]; @@ -196,6 +197,7 @@ GPUShader *EEVEE_shaders_background_studiolight_sh_get(void) { if (e_data.probe_background_studiolight_sh == NULL) { char *frag_str = BLI_string_joinN(datatoc_octahedron_lib_glsl, + datatoc_cubemap_lib_glsl, datatoc_common_uniforms_lib_glsl, datatoc_bsdf_common_lib_glsl, datatoc_lightprobe_lib_glsl, @@ -217,6 +219,7 @@ GPUShader *EEVEE_shaders_probe_cube_display_sh_get(void) { if (e_data.probe_cube_display_sh == NULL) { char *shader_str = BLI_string_joinN(datatoc_octahedron_lib_glsl, + datatoc_cubemap_lib_glsl, datatoc_common_view_lib_glsl, datatoc_common_uniforms_lib_glsl, datatoc_bsdf_common_lib_glsl, @@ -238,6 +241,7 @@ GPUShader *EEVEE_shaders_probe_grid_display_sh_get(void) { if (e_data.probe_grid_display_sh == NULL) { char *shader_str = BLI_string_joinN(datatoc_octahedron_lib_glsl, + datatoc_cubemap_lib_glsl, datatoc_common_view_lib_glsl, datatoc_common_uniforms_lib_glsl, datatoc_bsdf_common_lib_glsl, -- cgit v1.2.3