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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-07-19 13:27:49 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-07-19 13:49:37 +0300
commitc883946441ffefa7b931e73c4c9d67bcfd5d443b (patch)
tree857c8b394e3dda89d00731c5159aa09dabf94835 /intern/opensubdiv
parentd8de018398d0151e9004943382f7b218ae460b77 (diff)
OpenSubdiv: Fix broken structure alignment when using color material
Diffstat (limited to 'intern/opensubdiv')
-rw-r--r--intern/opensubdiv/gpu_shader_opensubd_display.glsl1
-rw-r--r--intern/opensubdiv/opensubdiv_gpu_capi.cc2
2 files changed, 3 insertions, 0 deletions
diff --git a/intern/opensubdiv/gpu_shader_opensubd_display.glsl b/intern/opensubdiv/gpu_shader_opensubd_display.glsl
index a17dcef81c7..3a9392e994c 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 698fdfee00f..20b3cffd2c8 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;