User data functions for shaders. More...
#include "ai_shaderglobals.h"#include "ai_array.h"#include "ai_color.h"#include "ai_matrix.h"#include "ai_vector.h"#include "ai_nodes.h"#include "ai_string.h"#include <stdint.h>Go to the source code of this file.
Macros | |||||
User-Data parameter | |||||
This macro is used to retrieve the user-data parameter from within the shaders.
| |||||
| #define | AiUDataGetParameter(_name) AiUserGetParameterFunc(_name, sg) | ||||
User-Data Readers | |||||
These macros are used to retrieve user-data values from within shaders. If a varying-type user-data is requested, then the user-data will be correctly interpolated across the face of the primitive. In the case of reading constant-type user-data, the usual node-parameter reading functions, such as AiNodeGetInt(), may also be used.
Please refer to ai_shader_userdef.h for a description of the userdef-data reading functions called by these macros. | |||||
| #define | AiUDataGetBool(_name, _val) AiUserGetBoolFunc (_name, sg, _val) | ||||
| #define | AiUDataGetByte(_name, _val) AiUserGetByteFunc (_name, sg, _val) | ||||
| #define | AiUDataGetInt(_name, _val) AiUserGetIntFunc (_name, sg, _val) | ||||
| #define | AiUDataGetUInt(_name, _val) AiUserGetUIntFunc (_name, sg, _val) | ||||
| #define | AiUDataGetFlt(_name, _val) AiUserGetFltFunc (_name, sg, _val) | ||||
| #define | AiUDataGetRGB(_name, _val) AiUserGetRGBFunc (_name, sg, _val) | ||||
| #define | AiUDataGetRGBA(_name, _val) AiUserGetRGBAFunc (_name, sg, _val) | ||||
| #define | AiUDataGetVec(_name, _val) AiUserGetVecFunc (_name, sg, _val) | ||||
| #define | AiUDataGetVec2(_name, _val) AiUserGetVec2Func (_name, sg, _val) | ||||
| #define | AiUDataGetStr(_name, _val) AiUserGetStrFunc (_name, sg, _val) | ||||
| #define | AiUDataGetPtr(_name, _val) AiUserGetPtrFunc (_name, sg, _val) | ||||
| #define | AiUDataGetNode(_name, _val) AiUserGetNodeFunc (_name, sg, _val) | ||||
| #define | AiUDataGetArray(_name, _val) AiUserGetArrayFunc (_name, sg, _val) | ||||
| #define | AiUDataGetMatrix(_name, _val) AiUserGetMatrixFunc(_name, sg, _val) | ||||
User-Data Derivatives with respect to screen X and Y | |||||||
These macros are used to retrieve user-data derivatives w.r.t. X and Y from within shaders. If a varying-type user-data is requested, then the user-data derivatives will be correctly interpolated across the face of the primitive. These derivatives can be useful in determining filter sizes to match pixel footprints, such as when texture mapping. In the case of reading constant-type user-data, the derivatives are zero.
Please refer to ai_shader_userdef.h for a description of the userdef-data reading functions called by these macros. | |||||||
| #define | AiUDataGetDxyDerivativesFlt(_name, _dx_val, _dy_val) AiUserGetDxyDerivativesFltFunc (_name, sg, _dx_val, _dy_val) | ||||||
| #define | AiUDataGetDxyDerivativesRGB(_name, _dx_val, _dy_val) AiUserGetDxyDerivativesRGBFunc (_name, sg, _dx_val, _dy_val) | ||||||
| #define | AiUDataGetDxyDerivativesRGBA(_name, _dx_val, _dy_val) AiUserGetDxyDerivativesRGBAFunc (_name, sg, _dx_val, _dy_val) | ||||||
| #define | AiUDataGetDxyDerivativesVec(_name, _dx_val, _dy_val) AiUserGetDxyDerivativesVecFunc (_name, sg, _dx_val, _dy_val) | ||||||
| #define | AiUDataGetDxyDerivativesVec2(_name, _dx_val, _dy_val) AiUserGetDxyDerivativesVec2Func (_name, sg, _dx_val, _dy_val) | ||||||
| #define | AiUDataGetDxyDerivativesArray(_name, _dx_val, _dy_val) AiUserGetDxyDerivativesArrayFunc (_name, sg, _dx_val, _dy_val) | ||||||
| #define | AiUDataGetDxyDerivativesMatrix(_name, _dx_val, _dy_val) AiUserGetDxyDerivativesMatrixFunc(_name, sg, _dx_val, _dy_val) | ||||||
| AI_API AI_DEVICE const AtUserParamEntry * | AiUserGetParameterFunc (const AtString, const AtShaderGlobals *) | ||||||
| Find a user-data parameter. More... | |||||||
| AI_API AI_DEVICE bool | AiUserGetBoolFunc (const AtString, const AtShaderGlobals *, bool &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetByteFunc (const AtString, const AtShaderGlobals *, uint8_t &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetIntFunc (const AtString, const AtShaderGlobals *, int &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetUIntFunc (const AtString, const AtShaderGlobals *, unsigned int &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetFltFunc (const AtString, const AtShaderGlobals *, float &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetRGBFunc (const AtString, const AtShaderGlobals *, AtRGB &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetRGBAFunc (const AtString, const AtShaderGlobals *, AtRGBA &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetVecFunc (const AtString, const AtShaderGlobals *, AtVector &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetVec2Func (const AtString, const AtShaderGlobals *, AtVector2 &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetStrFunc (const AtString, const AtShaderGlobals *, AtString &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetPtrFunc (const AtString, const AtShaderGlobals *, void *&) | ||||||
| AI_API AI_DEVICE bool | AiUserGetNodeFunc (const AtString, const AtShaderGlobals *, AtNode *&) | ||||||
| AI_API AI_DEVICE bool | AiUserGetArrayFunc (const AtString, const AtShaderGlobals *, AtArray *&) | ||||||
| AI_API AI_DEVICE bool | AiUserGetMatrixFunc (const AtString, const AtShaderGlobals *, AtMatrix &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetDxyDerivativesFltFunc (const AtString, const AtShaderGlobals *, float &, float &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetDxyDerivativesRGBFunc (const AtString, const AtShaderGlobals *, AtRGB &, AtRGB &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetDxyDerivativesRGBAFunc (const AtString, const AtShaderGlobals *, AtRGBA &, AtRGBA &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetDxyDerivativesVecFunc (const AtString, const AtShaderGlobals *, AtVector &, AtVector &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetDxyDerivativesVec2Func (const AtString, const AtShaderGlobals *, AtVector2 &, AtVector2 &) | ||||||
| AI_API AI_DEVICE bool | AiUserGetDxyDerivativesArrayFunc (const AtString, const AtShaderGlobals *, AtArray *&, AtArray *&) | ||||||
| AI_API AI_DEVICE bool | AiUserGetDxyDerivativesMatrixFunc (const AtString, const AtShaderGlobals *, AtMatrix &, AtMatrix &) | ||||||
User data functions for shaders.