Fix T75938: Workbench normal direction for matcaps

Set useMatcap to ensure correct normal direction when using matcaps
in the workbench engine.
This commit is contained in:
Robert Guetzkow 2020-04-22 19:08:00 +02:00
parent f9649e2bf1
commit 0dfe30502a
Notes: blender-bot 2023-02-14 08:10:10 +01:00
Referenced by commit 821316b034, Reset submodule to the right place in master
Referenced by issue #75938, MatCap inverts if Viewport Display Metallic and Roughness are set below certain threshold
4 changed files with 5 additions and 3 deletions

@ -1 +1 @@
Subproject commit c68481a509eaf79ce61a4391ec1e11a7760d5457
Subproject commit 80f390fd0e20d7e2aadf07c43a45717e810fa10d

@ -1 +1 @@
Subproject commit f12430cae606db8aeeb72f99fe15ebbd71d4a92c
Subproject commit 44c17b01168ea180d7ea865e9ec1ef6e93097b3a

View File

@ -92,10 +92,12 @@ void workbench_opaque_cache_init(WORKBENCH_Data *data)
wpd->prepass[opaque][infront][hair].common_shgrp = grp = DRW_shgroup_create(sh, pass);
DRW_shgroup_uniform_block(grp, "material_block", wpd->material_ubo_curr);
DRW_shgroup_uniform_int_copy(grp, "materialIndex", -1);
DRW_shgroup_uniform_bool_copy(grp, "useMatcap", use_matcap);
wpd->prepass[opaque][infront][hair].vcol_shgrp = grp = DRW_shgroup_create(sh, pass);
DRW_shgroup_uniform_block_persistent(grp, "material_block", wpd->material_ubo_curr);
DRW_shgroup_uniform_int_copy(grp, "materialIndex", 0); /* Default material. (uses vcol) */
DRW_shgroup_uniform_bool_copy(grp, "useMatcap", use_matcap);
sh = workbench_shader_opaque_image_get(wpd, hair, false);

@ -1 +1 @@
Subproject commit 8a36c2833db48ed78c436ee19534ce5cf3b2eeee
Subproject commit 35dd27ded664b1068e773c27988ee221f3ce39d9