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>2018-12-03 02:36:54 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-12-03 19:19:11 +0300
commit24fd03d0c2fc5f49bc3813afce7ac5d67fc762bd (patch)
tree4af65d73762c28ce003d425cb288d66bec226a3d /source/blender/draw/intern
parent17a4323ef59570975b254da9936fde16969b1df0 (diff)
Workbench: Reduce VRAM usage depending on mode
We exploit the fact that we are using the metallic workflow for material and pass the metallic parameter instead of the specular color. Pack the front facing bit in the color buffer only for matcap display. Change buffer formats to use less bytes as possible. Also don't request buffers that we won't use. Saved 40MB on 2K screen on StudioLight + Shadows + Specular Lighting. Includes several cleanups.
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r--source/blender/draw/intern/draw_manager_texture.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c
index 36882a87408..be6e66c339f 100644
--- a/source/blender/draw/intern/draw_manager_texture.c
+++ b/source/blender/draw/intern/draw_manager_texture.c
@@ -33,6 +33,8 @@ static bool drw_texture_format_supports_framebuffer(GPUTextureFormat format)
switch (format) {
/* Only add formats that are COMPATIBLE with FB.
* Generally they are multiple of 16bit. */
+ case GPU_R8:
+ case GPU_R8UI:
case GPU_R16F:
case GPU_R16I:
case GPU_R16UI: