Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-03-11 19:12:01 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-03-11 19:12:16 +0300
commit7dd0be9554ae7a728ded1a95d4709a93b68301b4 (patch)
tree52a097fd8edd1128def41fcda6bed64e8c6b39b7 /source/blender/draw/engines/eevee/eevee_private.h
parentc476c36e400883d929a7149def8dcb6ad6157a86 (diff)
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
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_private.h')
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index 5ffea393e1f..d266b7793c4 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -78,6 +78,8 @@ extern struct DrawEngineType draw_engine_eevee_type;
SHADER_IRRADIANCE
/* clang-format on */
+#define EEVEE_PROBE_MAX min_ii(MAX_PROBE, GPU_max_texture_layers() / 6)
+
#define SWAP_DOUBLE_BUFFERS() \
{ \
if (effects->swap_double_buffer) { \
@@ -136,20 +138,7 @@ extern struct DrawEngineType draw_engine_eevee_type;
((v3d->shading.type == OB_RENDER) && \
((v3d->shading.flag & V3D_SHADING_SCENE_WORLD_RENDER) == 0))))
-#define MIN_CUBE_LOD_LEVEL 3
-
-BLI_INLINE int octahedral_size_from_cubesize(int cube_size)
-{
- int cube_pixel_count = square_i(cube_size) * 6;
- int octa_size = (int)ceilf(sqrtf(cube_pixel_count));
- int lod_count = log2_floor_u(octa_size) - MIN_CUBE_LOD_LEVEL;
- /* Find lowest lod size and grow back to avoid having non matching mipsizes that would
- * break trilinear interpolation. */
- octa_size /= 1 << lod_count;
- octa_size *= 1 << lod_count;
- return octa_size;
-}
-
+#define MIN_CUBE_LOD_LEVEL 1
#define MAX_PLANAR_LOD_LEVEL 9
/* All the renderpasses that use the GPUMaterial for accumulation */