diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-03-11 19:12:01 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-03-11 19:12:16 +0300 |
commit | 7dd0be9554ae7a728ded1a95d4709a93b68301b4 (patch) | |
tree | 52a097fd8edd1128def41fcda6bed64e8c6b39b7 /source/blender/draw/intern/draw_manager_texture.c | |
parent | c476c36e400883d929a7149def8dcb6ad6157a86 (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/intern/draw_manager_texture.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_texture.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c index c75299158a3..3f11fe9d11e 100644 --- a/source/blender/draw/intern/draw_manager_texture.c +++ b/source/blender/draw/intern/draw_manager_texture.c @@ -123,6 +123,15 @@ GPUTexture *DRW_texture_create_cube(int w, return tex; } +GPUTexture *DRW_texture_create_cube_array( + int w, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels) +{ + GPUTexture *tex = GPU_texture_create_cube_array(w, d, format, fpixels, NULL); + drw_texture_set_parameters(tex, flags); + + return tex; +} + GPUTexture *DRW_texture_pool_query_2d(int w, int h, eGPUTextureFormat format, |