ai_shader_aovs.h
Go to the documentation of this file.
1 // Copyright 2020 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_api.h"
14 #include "ai_params.h"
15 #include "ai_color.h"
16 #include "ai_vector.h"
17 #include "ai_string.h"
18 #include <stdint.h> // uint32_t etc
19 
20 struct AtShaderGlobals;
21 
60 AI_API AI_DEVICE bool AiAOVSetBool (AtShaderGlobals* sg, const AtString name, bool val);
61 AI_API AI_DEVICE bool AiAOVSetInt (AtShaderGlobals* sg, const AtString name, int val);
62 AI_API AI_DEVICE bool AiAOVSetFlt (AtShaderGlobals* sg, const AtString name, float val);
63 AI_API AI_DEVICE bool AiAOVSetRGB (AtShaderGlobals* sg, const AtString name, AtRGB val);
64 AI_API AI_DEVICE bool AiAOVSetRGBA (AtShaderGlobals* sg, const AtString name, AtRGBA val);
65 AI_API AI_DEVICE bool AiAOVSetVec (AtShaderGlobals* sg, const AtString name, AtVector val);
66 AI_API AI_DEVICE bool AiAOVSetVec2 (AtShaderGlobals* sg, const AtString name, AtVector2 val);
67 AI_API bool AiAOVSetMatrix(AtShaderGlobals* sg, const AtString name, AtMatrix val);
68 AI_API AI_DEVICE bool AiAOVSetPtr (AtShaderGlobals* sg, const AtString name, void* val);
69 /*\}*/
70 
84 AI_API AI_DEVICE bool AiAOVGetBool (const AtShaderGlobals* sg, const AtString name, bool& val);
85 AI_API AI_DEVICE bool AiAOVGetInt (const AtShaderGlobals* sg, const AtString name, int& val);
86 AI_API AI_DEVICE bool AiAOVGetFlt (const AtShaderGlobals* sg, const AtString name, float& val);
87 AI_API AI_DEVICE bool AiAOVGetRGB (const AtShaderGlobals* sg, const AtString name, AtRGB& val);
88 AI_API AI_DEVICE bool AiAOVGetRGBA (const AtShaderGlobals* sg, const AtString name, AtRGBA& val);
89 AI_API AI_DEVICE bool AiAOVGetVec (const AtShaderGlobals* sg, const AtString name, AtVector& val);
90 AI_API AI_DEVICE bool AiAOVGetVec2 (const AtShaderGlobals* sg, const AtString name, AtVector2& val);
91 AI_API bool AiAOVGetMatrix(const AtShaderGlobals* sg, const AtString name, AtMatrix& val);
92 AI_API AI_DEVICE bool AiAOVGetPtr (const AtShaderGlobals* sg, const AtString name, void*& val);
93 /*\}*/
94 
95 #define AI_AOV_BLEND_NONE 0
96 #define AI_AOV_BLEND_OPACITY 1
97 
98 AI_API bool AiAOVEnabled(const AtString name, uint8_t type);
99 AI_API bool AiAOVRegister(const char* name, uint8_t type, int blend_mode = AI_AOV_BLEND_NONE);
100 
101 /*\}*/
RGB color.
Definition: ai_color.h:31
Vector math types, operators and utilities.
Arnold String allows for fast string comparisons.
Definition: ai_string.h:46
3D point (single precision)
Definition: ai_vector.h:29
Color types and utilities.
Definition: ai_matrix.h:30
DLL export prefix for API functions (necessary for multi-platform development)
2D point
Definition: ai_vector.h:254
AI_API bool AiAOVEnabled(const AtString name, uint8_t type)
Query whether an AOV is enabled (exists) or not.
Definition: ai_aov.cpp:46
AI_API bool AiAOVRegister(const char *name, uint8_t type, int blend_mode=AI_AOV_BLEND_NONE)
Register a new AOV in the global AOV list.
Definition: ai_aov.cpp:66
Shader globals data structure.
Definition: ai_shaderglobals.h:45
RGB color + alpha.
Definition: ai_color.h:266
Node parameters.
AtString class for fast comparisons.

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