Volume Rendering API

Volume functions for shaders. More...

Volume sampling

These macros are used to retrieve volume channel values from within volume shaders.

Parameters
_channelName of data channel in the volume node
_interpVolume interpolation quality, one of AI_VOLUME_INTERP_*
[out]_valResulting sampled value at the shader globals position
Returns
True if sampling was successful

Please refer to ai_shader_volume.h for a description of the volume sampling functions called by these macros.

AI_API AI_DEVICE bool AiVolumeSampleFltFunc (const AtString channel, const AtShaderGlobals *sg, int interp, float *value)
 
AI_API AI_DEVICE bool AiVolumeSampleRGBFunc (const AtString channel, const AtShaderGlobals *sg, int interp, AtRGB *value)
 
AI_API AI_DEVICE bool AiVolumeSampleRGBAFunc (const AtString channel, const AtShaderGlobals *sg, int interp, AtRGBA *value)
 
AI_API AI_DEVICE bool AiVolumeSampleVecFunc (const AtString channel, const AtShaderGlobals *sg, int interp, AtVector *value)
 
AI_API AI_DEVICE bool AiVolumeSampleVec2Func (const AtString channel, const AtShaderGlobals *sg, int interp, AtVector2 *value)
 
#define AiVolumeSampleFlt(_channel, _interp, _val)   AiVolumeSampleFltFunc (_channel, sg, _interp, _val)
 
#define AiVolumeSampleRGB(_channel, _interp, _val)   AiVolumeSampleRGBFunc (_channel, sg, _interp, _val)
 
#define AiVolumeSampleRGBA(_channel, _interp, _val)   AiVolumeSampleRGBAFunc(_channel, sg, _interp, _val)
 
#define AiVolumeSampleVec(_channel, _interp, _val)   AiVolumeSampleVecFunc (_channel, sg, _interp, _val)
 
#define AiVolumeSampleVec2(_channel, _interp, _val)   AiVolumeSampleVec2Func(_channel, sg, _interp, _val)
 

Detailed Description

Volume functions for shaders.


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