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>2014-08-12 23:48:15 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-08-12 23:48:15 +0400
commite5fd5599bc53183b3c919e9644ea6fd1eaa399e0 (patch)
treef484d55601ff9fb96643bb36b67292a11550f525 /source/blender/render/intern/include/render_types.h
parente9ef7a83582bc3d1eb4c2b016cae8bcf295a752d (diff)
Fix T40566: Light instances disappears in rendered viewport (Blender Internal)
This is just another issue caused by convertblender overwriting the object matrix at the time of creating render object. What's even worse here is that original matrix is not stored for the lamps, only lamp_matrix*view_matrix is stored. For sure we can combine lar->co and lar->mat back to mat4, multiply by the inverse view matrix and get object matrix, but this is not suitable for the viewport render because every viewport rotation will accumulate the error. For now let's store worldspace lamp matrix in the LampRen structure and use it when rotating the scene.
Diffstat (limited to 'source/blender/render/intern/include/render_types.h')
-rw-r--r--source/blender/render/intern/include/render_types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 536a2b8a85f..b87b1e6f367 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -595,7 +595,9 @@ typedef struct LampRen {
float imat[3][3];
float spottexfac;
float sh_invcampos[3], sh_zfac; /* sh_= spothalo */
-
+
+ float lampmat[4][4]; /* worls space lamp matrix, used for scene rotation */
+
float mat[3][3]; /* 3x3 part from lampmat x viewmat */
float area[8][3], areasize;