ai_shader_closure.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_closure.h"
14 #include "ai_color.h"
15 #include "ai_shaderglobals.h"
16 
34 /* BSSRDF Closures */
35 AI_API AI_DEVICE AtClosure AiClosureEmpiricalBSSRDF(const AtShaderGlobals* sg, const AtRGB& weight, const AtVector& mfp, const AtRGB& albedo);
36 AI_API AI_DEVICE AtClosure AiClosureRandomWalkBSSRDF(const AtShaderGlobals* sg, const AtRGB& weight, const AtVector& mfp, const AtRGB& albedo, float g = 0.0f);
37 AI_API AI_DEVICE AtClosure AiClosureRandomWalkV2BSSRDF(const AtShaderGlobals* sg, const AtRGB& weight, const AtVector& mfp, const AtRGB& albedo, float g = 0.0f);
38 AI_API AI_DEVICE void AiClosureBSSRDFSetDirectIndirect(AtClosure closure, float weight_direct, float weight_indirect);
39 
40 /* Emission Closures */
41 AI_API AI_DEVICE AtClosure AiClosureEmission(const AtShaderGlobals* sg, const AtRGB& weight);
42 
43 /* Transparency & Matte Closures */
44 AI_API AI_DEVICE AtClosure AiClosureTransparent(const AtShaderGlobals* sg, const AtRGB& weight = AI_RGB_WHITE, const AtClosureList interior = NULL, int32_t importance=0);
45 AI_API AtClosure AiClosureMatte(const AtShaderGlobals* sg, const AtRGB& weight = AI_RGB_WHITE);
46 
47 /* Background Closure */
48 AI_API AtClosure AiClosureBackground(const AtShaderGlobals* sg, const AtRGB& weight = AI_RGB_WHITE);
49 
50 /* Volume Closures */
51 AI_API AI_DEVICE AtClosure AiClosureVolumeAbsorption(const AtShaderGlobals* sg, const AtRGB& weight);
52 AI_API AI_DEVICE AtClosure AiClosureVolumeEmission(const AtShaderGlobals* sg, const AtRGB& weight);
53 AI_API AI_DEVICE AtClosure AiClosureVolumeHenyeyGreenstein(const AtShaderGlobals* sg, const AtRGB& absorption, const AtRGB& scattering, const AtRGB& emission, float g = 0.f);
54 AI_API AI_DEVICE AtClosure AiClosureVolumeMatte(const AtShaderGlobals* sg, const AtRGB& weight);
55 AI_API AI_DEVICE AtClosure AiClosureVolumeAtmosphere(const AtShaderGlobals* sg, const AtRGB& emission, const AtRGB& transparent, const AtRGB& matte);
56 
57 /*\}*/
AI_API AI_DEVICE AtClosure AiClosureVolumeMatte(const AtShaderGlobals *sg, const AtRGB &weight)
Create volume matte closure, for volume shaders.
Definition: ai_shader_closure.cpp:369
RGB color.
Definition: ai_color.h:31
AI_API AI_DEVICE AtClosure AiClosureTransparent(const AtShaderGlobals *sg, const AtRGB &weight=AI_RGB_WHITE, const AtClosureList interior=NULL, int32_t importance=0)
Create transparent closure for surface shaders.
Definition: ai_shader_closure.cpp:248
AI_API AI_DEVICE AtClosure AiClosureVolumeAtmosphere(const AtShaderGlobals *sg, const AtRGB &emission, const AtRGB &transparent, const AtRGB &matte)
Create volume atmosphere closure, for legacy atmosphere shaders.
Definition: ai_shader_closure.cpp:389
Shader globals struct, methods and macros.
AI_API AtClosure AiClosureMatte(const AtShaderGlobals *sg, const AtRGB &weight=AI_RGB_WHITE)
Create matte closure for surface shaders.
Definition: ai_shader_closure.cpp:264
AI_API AI_DEVICE AtClosure AiClosureEmission(const AtShaderGlobals *sg, const AtRGB &weight)
Create emission closure for surface shaders.
Definition: ai_shader_closure.cpp:222
3D point (single precision)
Definition: ai_vector.h:29
Definition: ai_closure.h:60
Color types and utilities.
AI_API AI_DEVICE void AiClosureBSSRDFSetDirectIndirect(AtClosure closure, float weight_direct, float weight_indirect)
Set the BSSRDF closure direct and indirect light contribution weights.
Definition: ai_shader_closure.cpp:204
AI_API AI_DEVICE AtClosure AiClosureEmpiricalBSSRDF(const AtShaderGlobals *sg, const AtRGB &weight, const AtVector &mfp, const AtRGB &albedo)
Create BSSRDF closure for subsurface scattering in surface shaders.
Definition: ai_shader_closure.cpp:130
Shader globals data structure.
Definition: ai_shaderglobals.h:45
AI_API AtClosure AiClosureBackground(const AtShaderGlobals *sg, const AtRGB &weight=AI_RGB_WHITE)
Create background closure for background surface shaders.
Definition: ai_shader_closure.cpp:276
AI_API AI_DEVICE AtClosure AiClosureRandomWalkV2BSSRDF(const AtShaderGlobals *sg, const AtRGB &weight, const AtVector &mfp, const AtRGB &albedo, float g=0.0f)
Create BSSRDF closure for subsurface scattering in surface shaders.
Definition: ai_shader_closure.cpp:185
AI_API AI_DEVICE AtClosure AiClosureRandomWalkBSSRDF(const AtShaderGlobals *sg, const AtRGB &weight, const AtVector &mfp, const AtRGB &albedo, float g=0.0f)
Create BSSRDF closure for subsurface scattering in surface shaders.
Definition: ai_shader_closure.cpp:157
Definition: ai_closure.h:84
AI_API AI_DEVICE AtClosure AiClosureVolumeAbsorption(const AtShaderGlobals *sg, const AtRGB &weight)
Create volume absorption closure, for volume shaders.
Definition: ai_shader_closure.cpp:298
AI_API AI_DEVICE AtClosure AiClosureVolumeEmission(const AtShaderGlobals *sg, const AtRGB &weight)
Create volume emission closure, for volume shaders.
Definition: ai_shader_closure.cpp:353
AI_API AI_DEVICE AtClosure AiClosureVolumeHenyeyGreenstein(const AtShaderGlobals *sg, const AtRGB &absorption, const AtRGB &scattering, const AtRGB &emission, float g=0.f)
Create Henyey-Greenstein volume scattering closure, for volume shaders.
Definition: ai_shader_closure.cpp:329
Closure type and utilities.

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