Data Structures | Typedefs | Functions
Shader Globals API

Data Structures

struct  AtShaderGlobals
 Shader globals data structure. More...
 

Typedefs

typedef struct AtShaderGlobals AtShaderGlobals
 Shader globals data structure. More...
 

Functions

AI_API AtShaderGlobalsAiShaderGlobals ()
 Allocate and initialize an AtShaderGlobals structure (a shading context) More...
 
AI_API void AiShaderGlobalsDestroy (AtShaderGlobals *sg)
 Deallocate an AtShaderGlobals struct. More...
 

Shading Contexts

These macros let you determine the purpose that the shader globals were defined for.

#define AI_CONTEXT_SURFACE   0x00
 for ray-surface intersections
 
#define AI_CONTEXT_VOLUME   0x01
 for volume points during ray-marching
 
#define AI_CONTEXT_BACKGROUND   0x02
 for rays that don't hit any geometry
 
#define AI_CONTEXT_DISPLACEMENT   0x03
 for each vertex to be displaced
 

Detailed Description

Typedef Documentation

Shader globals data structure.

An AtShaderGlobals structure represents a shading context that holds all the information accesible to the different types of shaders. For example, after a camera ray hits the surface of an object, a shading context of type AI_CONTEXT_SURFACE is created that contains, amongst other things, local geometric properties such as the surface normal, the UV surface parameters, etc.

Function Documentation

AI_API AtShaderGlobals* AiShaderGlobals ( )

Allocate and initialize an AtShaderGlobals structure (a shading context)

Returns
a new AtShaderGlobals object
AI_API void AiShaderGlobalsDestroy ( AtShaderGlobals sg)

Deallocate an AtShaderGlobals struct.

Parameters
sga shader globals context

© 2009-2013 Solid Angle SL · all rights reserved · www.solidangle.com