diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-12 17:13:56 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-12 17:13:56 +0400 |
commit | ebc653463ddfd9f8b893b6acbcc6465972e6abc6 (patch) | |
tree | 6b3cc2ba3f04994cf9f8d8f5bca6d63cfe2c9d1f /intern/cycles/kernel/kernel_types.h | |
parent | c40492205b4369de3babe63b43d127ca622773ec (diff) |
Cycles:
* Fix missing update when editing objects with emission materials.
* Fix preview pass rendering set to 1 not showing full resolution.
* Fix CUDA runtime compiling failing due to missing cache directory.
* Use settings from first render layer for visibility and material override.
And a bunch of incomplete and still disabled code mostly related to closure
sampling.
Diffstat (limited to 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 76 |
1 files changed, 37 insertions, 39 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 1417f2d5110..d3012324739 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -34,6 +34,9 @@ CCL_NAMESPACE_BEGIN #define __BACKGROUND__ #define __CAUSTICS_TRICKS__ #define __VISIBILITY_FLAG__ +#define __RAY_DIFFERENTIALS__ +#define __CAMERA_CLIPPING__ +#define __INTERSECTION_REFINE__ #ifndef __KERNEL_OPENCL__ #define __SVM__ @@ -42,9 +45,13 @@ CCL_NAMESPACE_BEGIN #define __HOLDOUT__ #endif -#define __RAY_DIFFERENTIALS__ -#define __CAMERA_CLIPPING__ -#define __INTERSECTION_REFINE__ +#ifdef __KERNEL_CPU__ +//#define __MULTI_CLOSURE__ +//#define __MULTI_LIGHT__ +//#define __TRANSPARENT_SHADOWS__ +//#define __OSL__ +#endif + //#define __SOBOL_FULL_SCREEN__ //#define __MODIFY_TP__ //#define __QBVH__ @@ -179,20 +186,27 @@ typedef enum AttributeElement { ATTR_ELEMENT_NONE } AttributeElement; -/* OSL data */ +/* Closure data */ -#if !defined(__KERNEL_GPU__) && defined(WITH_OSL) +#define MAX_CLOSURE 8 -#define MAX_OSL_CLOSURE 8 - -struct FlatClosure { - void *prim; +typedef struct ShaderClosure { + ClosureType type; float3 weight; + +#ifdef __MULTI_CLOSURE__ float sample_weight; -}; +#endif +#ifdef __OSL__ + void *prim; +#else + float data0; + float data1; #endif +} ShaderClosure; + /* Shader Data * * Main shader state at a point on the surface or in a volume. All coordinates @@ -244,34 +258,18 @@ typedef struct ShaderData { float3 dPdu, dPdv; #endif - /* SVM closure data. we always sample a single closure, to get fixed - * memory usage, svm_closure_data contains closure parameters. */ - ClosureType svm_closure; - float3 svm_closure_weight; - float svm_closure_data0; - float svm_closure_data1; - -#if !defined(__KERNEL_GPU__) && defined(WITH_OSL) - /* OSL closure data and context. we store all closures flattened into - * lists per type, different from SVM. */ - struct { - FlatClosure bsdf[MAX_OSL_CLOSURE]; - FlatClosure emissive[MAX_OSL_CLOSURE]; - FlatClosure volume[MAX_OSL_CLOSURE]; - - int num_bsdf; - int num_emissive; - int num_volume; - - float bsdf_sample_sum; - float emissive_sample_sum; - float volume_sample_sum; - - float3 holdout_weight; - - float randb; - } osl_closure; +#ifdef __MULTI_CLOSURE__ + /* Closure data, we store a fixed array of closures */ + ShaderClosure closure[MAX_CLOSURE]; + int num_closure; + float randb_closure; +#else + /* Closure data, with a single sampled closure for low memory usage */ + ShaderClosure closure; +#endif +#ifdef __OSL__ + /* OSL context */ void *osl_ctx; #endif } ShaderData; @@ -352,11 +350,11 @@ typedef struct KernelSunSky { typedef struct KernelIntegrator { /* emission */ int use_emission; - int num_triangles; int num_distribution; - int num_lights; + int num_all_lights; float pdf_triangles; float pdf_lights; + float pdf_pad; /* bounces */ int min_bounce; |