Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Contents

Introduction

RixShadingContext is analogous to a RenderMan grid - it is a group of 1 or more points that may be shaded. The group of points usually arrive through ray traced "hits". In this case, the shading context provides geometric details through its GetPrimVar and GetBuiltinVar methods. Associated with each primvar is a varying filter size that is computed as a function of rendering conditions such as shading rate and ray differentials. The incoming positions are not guaranteed to be neighbors and so do not support requirements for computing first-differences. Rather, differential information is embodied through filter radii and these are only computable for known builtin and primitive variables.

ShadingContexts can also be produced by ray traced "misses". Now only the ray origination information is available and the class of shading activities is limited to cases where no bxdf, builtin and primitive variables are required. RixShadingContexts are comprised exclusively of hits or misses and optionally delivered across the RixIntegratorContext's GetNearestHits method.

ShadingContexts operate in a small number of modes according to the integration requirements.

Traits

shadingCtxTraits conveys a variety of (uniform) ShadingContext traits to shader and integrator.

Memory Management

Allocate is fast memory allocation support from a memory pool tailored to Pattern and Bxdf plugins. Memory allocated via this interface is managed (freed) by RixShadingContext according to the lifetime requirements of the associated MemCategory. As with many custom memory allocation schemes, clients should use "placement new" and not rely on invocation of a destructor. RixAlloca can be used for intra-procedure dynamic memory allocation.

Document New, Allocator etc

Built-in Variables

Primitive Variables

Parameter Evaluation