[Bf-blender-cvs] [c6018391765] master: Fix T70106 Objects with multiple materials are not displaying correctly

Clément Foucault noreply at git.blender.org
Fri Sep 27 15:37:08 CEST 2019


Commit: c6018391765c4406f8e190cb837174ed259ac90d
Author: Clément Foucault
Date:   Thu Sep 26 17:40:48 2019 +0200
Branches: master
https://developer.blender.org/rBc6018391765c4406f8e190cb837174ed259ac90d

Fix T70106 Objects with multiple materials are not displaying correctly

Seems to be an issue with OSX and loading objects matrices from uniform
buffers.

Using legacy path for that reason.

===================================================================

M	source/blender/draw/modes/shaders/common_view_lib.glsl

===================================================================

diff --git a/source/blender/draw/modes/shaders/common_view_lib.glsl b/source/blender/draw/modes/shaders/common_view_lib.glsl
index fa4bb4f68c0..76089d1ae41 100644
--- a/source/blender/draw/modes/shaders/common_view_lib.glsl
+++ b/source/blender/draw/modes/shaders/common_view_lib.glsl
@@ -71,7 +71,7 @@ flat in int resourceIDFrag;
 #  define resource_id resourceIDFrag
 #endif
 
-#if !defined(GPU_INTEL) && !defined(GPU_DEPRECATED_AMD_DRIVER)
+#if !defined(GPU_INTEL) && !defined(GPU_DEPRECATED_AMD_DRIVER) && !defined(OS_MAC)
 struct ObjectMatrices {
   mat4 drw_modelMatrix;
   mat4 drw_modelMatrixInverse;
@@ -88,6 +88,8 @@ layout(std140) uniform modelBlock
 #else /* GPU_INTEL */
 /* Intel GPU seems to suffer performance impact when the model matrix is in UBO storage.
  * So for now we just force using the legacy path. */
+/* Note that this is also a workaround of a problem on osx (amd or nvidia)
+ * and older amd driver on windows. */
 uniform mat4 ModelMatrix;
 uniform mat4 ModelMatrixInverse;
 #endif



More information about the Bf-blender-cvs mailing list