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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-06-05 09:15:30 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-06-05 12:38:33 +0300
commita3815f87773c7d45740c98c888718424d736870b (patch)
tree4cd46cb327fe76e1dfcde04dcdd99d1cc4a2e9b5 /source/blender/draw/engines/workbench/workbench_forward.c
parentade710500df4f333077daa96e3ab72eb2cdc3b94 (diff)
Workbench: Matcaps T55291
- users can use their own matcaps .config/blender/2.80/datafiles/studiolights/matcap/ folder - upto 100 matcaps can be loaded - color of the matcap is influenced by the color of the material/single color etc. To show the plain matcap use single color at 1.0 - chosing a matcap is at lighting level (flat/studio/matcap) - matcap only possible in solid mode - also works for X-Ray mode As the old matcaps are still in used by the clay engine I didn't remove it yet.
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_forward.c')
-rw-r--r--source/blender/draw/engines/workbench/workbench_forward.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c
index 3ed0c207bec..931ffc61810 100644
--- a/source/blender/draw/engines/workbench/workbench_forward.c
+++ b/source/blender/draw/engines/workbench/workbench_forward.c
@@ -202,7 +202,13 @@ static WORKBENCH_MaterialData *get_or_create_material_data(
material->material_data.roughness = material_template.material_data.roughness;
switch (drawtype) {
case OB_SOLID:
+ {
+ if (STUDIOLIGHT_ORIENTATION_VIEWNORMAL_ENABLED(wpd)) {
+ BKE_studiolight_ensure_flag(wpd->studio_light, STUDIOLIGHT_EQUIRECTANGULAR_RADIANCE_GPUTEXTURE);
+ DRW_shgroup_uniform_texture(grp, "matcapImage", wpd->studio_light->equirectangular_radiance_gputexture);
+ }
break;
+ }
case OB_TEXTURE:
{