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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user