diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-09-15 19:41:37 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-09-15 19:41:37 +0400 |
commit | 21964e65380131324dcb50567e913cf6e4a29102 (patch) | |
tree | 3dd5dd0d705ac1fb312cc9e2ce0c9cffea854c12 /intern/cycles/render/osl.h | |
parent | 2390a2657e3ba1bde477d999c06d000491edbea8 (diff) |
OSL implementation of RGB ramp node.
The sampled color ramp data is passed to OSL as a color array. This has to be done as actual float[3] array though, since the Cycles float3 type actually contains 4 floats, leading to shifting color components in the array.
Additional parameter set functions for arrays have been added to the Cycles OSL interface for this purpose.
Diffstat (limited to 'intern/cycles/render/osl.h')
-rw-r--r-- | intern/cycles/render/osl.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h index 329cf9a4828..2da951ab3d2 100644 --- a/intern/cycles/render/osl.h +++ b/intern/cycles/render/osl.h @@ -79,6 +79,15 @@ public: void parameter(const char *name, ustring str); void parameter(const char *name, const Transform& tfm); + void parameter_array(const char *name, const float f[], int arraylen); + void parameter_color_array(const char *name, const float f[][3], int arraylen); + void parameter_vector_array(const char *name, const float f[][3], int arraylen); + void parameter_normal_array(const char *name, const float f[][3], int arraylen); + void parameter_point_array(const char *name, const float f[][3], int arraylen); + void parameter_array(const char *name, const int f[], int arraylen); + void parameter_array(const char *name, const char * const s[], int arraylen); + void parameter_array(const char *name, const Transform tfm[], int arraylen); + ShaderType output_type() { return current_type; } bool background; |