ai_shader_userdef.h
Go to the documentation of this file.
1// Copyright 2021 Autodesk, Inc. All rights reserved.
2//
3// Use of this software is subject to the terms of the Autodesk license
4// agreement provided at the time of installation or download, or which
5// otherwise accompanies this software in either electronic or hard copy form.
6
12#pragma once
13#include "ai_shaderglobals.h"
14#include "ai_array.h"
15#include "ai_color.h"
16#include "ai_matrix.h"
17#include "ai_vector.h"
18#include "ai_nodes.h"
19#include "ai_string.h"
20#include <stdint.h> // uint32_t etc
21
63#define AiUDataGetParameter(_name) AiUserGetParameterFunc(_name, sg)
64/*\}*/
65
85#define AiUDataGetBool(_name,_val) AiUserGetBoolFunc (_name, sg, _val)
86#define AiUDataGetByte(_name,_val) AiUserGetByteFunc (_name, sg, _val)
87#define AiUDataGetInt(_name,_val) AiUserGetIntFunc (_name, sg, _val)
88#define AiUDataGetUInt(_name,_val) AiUserGetUIntFunc (_name, sg, _val)
89#define AiUDataGetFlt(_name,_val) AiUserGetFltFunc (_name, sg, _val)
90#define AiUDataGetRGB(_name,_val) AiUserGetRGBFunc (_name, sg, _val)
91#define AiUDataGetRGBA(_name,_val) AiUserGetRGBAFunc (_name, sg, _val)
92#define AiUDataGetVec(_name,_val) AiUserGetVecFunc (_name, sg, _val)
93#define AiUDataGetVec2(_name,_val) AiUserGetVec2Func (_name, sg, _val)
94#define AiUDataGetStr(_name,_val) AiUserGetStrFunc (_name, sg, _val)
95#define AiUDataGetPtr(_name,_val) AiUserGetPtrFunc (_name, sg, _val)
96#define AiUDataGetNode(_name,_val) AiUserGetNodeFunc (_name, sg, _val)
97#define AiUDataGetArray(_name,_val) AiUserGetArrayFunc (_name, sg, _val)
98#define AiUDataGetMatrix(_name,_val) AiUserGetMatrixFunc(_name, sg, _val)
99/*\}*/
100
101
125#define AiUDataGetDxyDerivativesFlt(_name,_dx_val,_dy_val) AiUserGetDxyDerivativesFltFunc (_name, sg, _dx_val, _dy_val)
126#define AiUDataGetDxyDerivativesRGB(_name,_dx_val,_dy_val) AiUserGetDxyDerivativesRGBFunc (_name, sg, _dx_val, _dy_val)
127#define AiUDataGetDxyDerivativesRGBA(_name,_dx_val,_dy_val) AiUserGetDxyDerivativesRGBAFunc (_name, sg, _dx_val, _dy_val)
128#define AiUDataGetDxyDerivativesVec(_name,_dx_val,_dy_val) AiUserGetDxyDerivativesVecFunc (_name, sg, _dx_val, _dy_val)
129#define AiUDataGetDxyDerivativesVec2(_name,_dx_val,_dy_val) AiUserGetDxyDerivativesVec2Func (_name, sg, _dx_val, _dy_val)
130#define AiUDataGetDxyDerivativesArray(_name,_dx_val,_dy_val) AiUserGetDxyDerivativesArrayFunc (_name, sg, _dx_val, _dy_val)
131#define AiUDataGetDxyDerivativesMatrix(_name,_dx_val,_dy_val) AiUserGetDxyDerivativesMatrixFunc(_name, sg, _dx_val, _dy_val)
132/*\}*/
133
134
135/*\}*/
136
137AI_API AI_DEVICE const AtUserParamEntry* AiUserGetParameterFunc(const AtString, const AtShaderGlobals*);
138
139AI_API AI_DEVICE bool AiUserGetBoolFunc (const AtString, const AtShaderGlobals*, bool&);
140AI_API AI_DEVICE bool AiUserGetByteFunc (const AtString, const AtShaderGlobals*, uint8_t&);
141AI_API AI_DEVICE bool AiUserGetIntFunc (const AtString, const AtShaderGlobals*, int&);
142AI_API AI_DEVICE bool AiUserGetUIntFunc (const AtString, const AtShaderGlobals*, unsigned int&);
143AI_API AI_DEVICE bool AiUserGetFltFunc (const AtString, const AtShaderGlobals*, float&);
144AI_API AI_DEVICE bool AiUserGetRGBFunc (const AtString, const AtShaderGlobals*, AtRGB&);
145AI_API AI_DEVICE bool AiUserGetRGBAFunc (const AtString, const AtShaderGlobals*, AtRGBA&);
146AI_API AI_DEVICE bool AiUserGetVecFunc (const AtString, const AtShaderGlobals*, AtVector&);
147AI_API AI_DEVICE bool AiUserGetVec2Func (const AtString, const AtShaderGlobals*, AtVector2&);
148AI_API AI_DEVICE bool AiUserGetStrFunc (const AtString, const AtShaderGlobals*, AtString&);
149AI_API AI_DEVICE bool AiUserGetPtrFunc (const AtString, const AtShaderGlobals*, void*&);
150AI_API AI_DEVICE bool AiUserGetNodeFunc (const AtString, const AtShaderGlobals*, AtNode*&);
151AI_API AI_DEVICE bool AiUserGetArrayFunc (const AtString, const AtShaderGlobals*, AtArray*&);
152AI_API AI_DEVICE bool AiUserGetMatrixFunc(const AtString, const AtShaderGlobals*, AtMatrix&);
153
154AI_API AI_DEVICE bool AiUserGetDxyDerivativesFltFunc (const AtString, const AtShaderGlobals*, float&, float&);
155AI_API AI_DEVICE bool AiUserGetDxyDerivativesRGBFunc (const AtString, const AtShaderGlobals*, AtRGB&, AtRGB&);
156AI_API AI_DEVICE bool AiUserGetDxyDerivativesRGBAFunc (const AtString, const AtShaderGlobals*, AtRGBA&, AtRGBA&);
157AI_API AI_DEVICE bool AiUserGetDxyDerivativesVecFunc (const AtString, const AtShaderGlobals*, AtVector&, AtVector&);
158AI_API AI_DEVICE bool AiUserGetDxyDerivativesVec2Func (const AtString, const AtShaderGlobals*, AtVector2&, AtVector2&);
159AI_API AI_DEVICE bool AiUserGetDxyDerivativesArrayFunc (const AtString, const AtShaderGlobals*, AtArray*&, AtArray*&);
160AI_API AI_DEVICE bool AiUserGetDxyDerivativesMatrixFunc (const AtString, const AtShaderGlobals*, AtMatrix&, AtMatrix&);
Generic array data type and methods.
Color types and utilities.
Matrix math type and methods.
AtNode struct and methods.
Shader globals struct, methods and macros.
AtString class for fast comparisons.
Vector math types, operators and utilities.
Arnold String allows for fast string comparisons.
Definition: ai_string.h:46
AI_API AI_DEVICE const AtUserParamEntry * AiUserGetParameterFunc(const AtString, const AtShaderGlobals *)
Find a user-data parameter.
Definition: ai_userdefs.cpp:61
Definition: ai_matrix.h:30
This represents a node in Arnold.
RGB color + alpha.
Definition: ai_color.h:267
RGB color.
Definition: ai_color.h:32
Shader globals data structure.
Definition: ai_shaderglobals.h:45
2D point
Definition: ai_vector.h:255
3D point (single precision)
Definition: ai_vector.h:30

© 2022 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com