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/gpu/intern/gpu_extensions.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/gpu/intern/gpu_extensions.c') diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 5a2b74f3407..f497ed22bec 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -78,6 +78,8 @@ static struct GPUGlobal { /* Some Intel drivers have limited support for `GLEW_ARB_base_instance` so in * these cases it is best to indicate that it is not supported. See T67951 */ bool glew_arb_base_instance_is_supported; + /* Cubemap Array support. */ + bool glew_arb_texture_cube_map_array_is_supported; /* Some Intel drivers have issues with using mips as framebuffer targets if * GL_TEXTURE_MAX_LEVEL is higher than the target mip. * We need a workaround in this cases. */ @@ -197,6 +199,11 @@ bool GPU_arb_base_instance_is_supported(void) return GG.glew_arb_base_instance_is_supported; } +bool GPU_arb_texture_cube_map_array_is_supported(void) +{ + return GG.glew_arb_texture_cube_map_array_is_supported; +} + bool GPU_mip_render_workaround(void) { return GG.mip_render_workaround; @@ -281,6 +288,7 @@ void gpu_extensions_init(void) } GG.glew_arb_base_instance_is_supported = GLEW_ARB_base_instance; + GG.glew_arb_texture_cube_map_array_is_supported = GLEW_ARB_texture_cube_map_array; gpu_detect_mip_render_workaround(); if (G.debug & G_DEBUG_GPU_FORCE_WORKAROUNDS) { -- cgit v1.2.3