ai_shader_aovs.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_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
20struct AtShaderGlobals;
21
60AI_API AI_DEVICE bool AiAOVSetBool (AtShaderGlobals* sg, const AtString name, bool val);
61AI_API AI_DEVICE bool AiAOVSetInt (AtShaderGlobals* sg, const AtString name, int val);
62AI_API AI_DEVICE bool AiAOVSetFlt (AtShaderGlobals* sg, const AtString name, float val);
63AI_API AI_DEVICE bool AiAOVSetRGB (AtShaderGlobals* sg, const AtString name, AtRGB val);
64AI_API AI_DEVICE bool AiAOVSetRGBA (AtShaderGlobals* sg, const AtString name, AtRGBA val);
65AI_API AI_DEVICE bool AiAOVSetVec (AtShaderGlobals* sg, const AtString name, AtVector val);
66AI_API AI_DEVICE bool AiAOVSetVec2 (AtShaderGlobals* sg, const AtString name, AtVector2 val);
67AI_API bool AiAOVSetMatrix(AtShaderGlobals* sg, const AtString name, AtMatrix val);
68AI_API AI_DEVICE bool AiAOVSetPtr (AtShaderGlobals* sg, const AtString name, void* val);
69/*\}*/
70
84AI_API AI_DEVICE bool AiAOVGetBool (const AtShaderGlobals* sg, const AtString name, bool& val);
85AI_API AI_DEVICE bool AiAOVGetInt (const AtShaderGlobals* sg, const AtString name, int& val);
86AI_API AI_DEVICE bool AiAOVGetFlt (const AtShaderGlobals* sg, const AtString name, float& val);
87AI_API AI_DEVICE bool AiAOVGetRGB (const AtShaderGlobals* sg, const AtString name, AtRGB& val);
88AI_API AI_DEVICE bool AiAOVGetRGBA (const AtShaderGlobals* sg, const AtString name, AtRGBA& val);
89AI_API AI_DEVICE bool AiAOVGetVec (const AtShaderGlobals* sg, const AtString name, AtVector& val);
90AI_API AI_DEVICE bool AiAOVGetVec2 (const AtShaderGlobals* sg, const AtString name, AtVector2& val);
91AI_API bool AiAOVGetMatrix(const AtShaderGlobals* sg, const AtString name, AtMatrix& val);
92AI_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
98AI_API bool AiAOVEnabled(const AtString name, uint8_t type);
99AI_API bool AiAOVRegister(const char* name, uint8_t type, int blend_mode = AI_AOV_BLEND_NONE);
100
101/*\}*/
DLL export prefix for API functions (necessary for multi-platform development)
Color types and utilities.
Node parameters.
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 bool AiAOVEnabled(const AtString name, uint8_t type)
Query whether an AOV is enabled (exists) or not.
Definition: ai_aov.cpp:48
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:69
Definition: ai_matrix.h:30
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