[Bf-blender-cvs] [c883946] master: OpenSubdiv: Fix broken structure alignment when using color material
Sergey Sharybin
noreply at git.blender.org
Tue Jul 19 12:49:01 CEST 2016
Commit: c883946441ffefa7b931e73c4c9d67bcfd5d443b
Author: Sergey Sharybin
Date: Tue Jul 19 12:27:49 2016 +0200
Branches: master
https://developer.blender.org/rBc883946441ffefa7b931e73c4c9d67bcfd5d443b
OpenSubdiv: Fix broken structure alignment when using color material
===================================================================
M intern/opensubdiv/gpu_shader_opensubd_display.glsl
M intern/opensubdiv/opensubdiv_gpu_capi.cc
===================================================================
diff --git a/intern/opensubdiv/gpu_shader_opensubd_display.glsl b/intern/opensubdiv/gpu_shader_opensubd_display.glsl
index a17dcef..3a9392e 100644
--- a/intern/opensubdiv/gpu_shader_opensubd_display.glsl
+++ b/intern/opensubdiv/gpu_shader_opensubd_display.glsl
@@ -208,6 +208,7 @@ struct LightSource {
float spotCutoff;
float spotExponent;
float spotCosCutoff;
+ float pad, pad2;
#endif
};
diff --git a/intern/opensubdiv/opensubdiv_gpu_capi.cc b/intern/opensubdiv/opensubdiv_gpu_capi.cc
index 698fdfe..20b3cff 100644
--- a/intern/opensubdiv/opensubdiv_gpu_capi.cc
+++ b/intern/opensubdiv/opensubdiv_gpu_capi.cc
@@ -47,6 +47,7 @@ using OpenSubdiv::Osd::GLMeshInterface;
extern "C" char datatoc_gpu_shader_opensubd_display_glsl[];
#define MAX_LIGHTS 8
+
typedef struct Light {
float position[4];
float ambient[4];
@@ -60,6 +61,7 @@ typedef struct Light {
float spot_cutoff;
float spot_exponent;
float spot_cos_cutoff;
+ float pad, pad2;
#endif
} Light;
More information about the Bf-blender-cvs
mailing list