diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-08 08:48:14 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-10 06:54:05 +0300 |
commit | b66efbecf4780c65833f72ac8de5d18b5bca7e15 (patch) | |
tree | 58f258df9e797f55ad1a77082115989df147e6db /intern/cycles/kernel/kernel_types.h | |
parent | 623141f339d5066ed6b96ad70ab45fb294e3e612 (diff) |
Code refactor: make Transform always affine, dropping last row.
This save a little memory and copying in the kernel by storing only a 4x3
matrix instead of a 4x4 matrix. We already did this in a few places, and
those don't need to be special exceptions anymore now.
Diffstat (limited to 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 5934ff53f57..567f2a04028 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -35,10 +35,10 @@ CCL_NAMESPACE_BEGIN /* Constants */ -#define OBJECT_VECTOR_SIZE 6 +#define OBJECT_VECTOR_SIZE 2 #define FILTER_TABLE_SIZE 1024 #define RAMP_TABLE_SIZE 256 -#define SHUTTER_TABLE_SIZE 256 +#define SHUTTER_TABLE_SIZE 256 #define BSSRDF_MIN_RADIUS 1e-8f #define BSSRDF_MAX_HITS 4 @@ -1483,8 +1483,8 @@ typedef struct KernelLight { int samples; float max_bounces; float random; - float4 tfm[3]; - float4 itfm[3]; + Transform tfm; + Transform itfm; union { KernelSpotLight spot; KernelAreaLight area; |