RenderManAPI  24.0
RixShading.h File Reference
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstring>
#include <new>
#include <vector>
#include "RixInterfaces.h"
#include "RixRNG.h"
#include "RiTypesHelper.h"

Go to the source code of this file.

Classes

class  RixShadingPlugin
 RixShadingPlugin is the base class for RixBxdfFactory, RixDisplacementFactory, RixDisplayFilter, RixIntegrator, RixLightFilter, RixLightFactory, RixPattern, RixProjection, and RixSampleFilter. More...
 
struct  RixShadingPlugin::InstanceData
 
struct  RixSCParamInfo
 RixSCParamInfo captures the characteristics of an individual ScParam. More...
 
class  RixParameterList
 RixParameterList exposes the non-varying values that are associated with the definition or editing of a shading plugin instance. More...
 
class  RixShadingContext
 RixShadingContext is analogous to a RenderMan grid - it is a group of 1 or more points that may be shaded. More...
 
struct  RixShadingContext::Id
 shadingCtxId is a unique identifier for this shading context. More...
 
class  RixShadingContext::Allocator
 Allocator is a utility (fully inlined) class to assist with tedious memory pool allocations. More...
 

Macros

#define k_RixShadingVersion   240
 

Enumerations

enum  RtHitSides { k_SidesFront = 1, k_SidesBack = 2, k_SidesBoth = 3 }
 
enum  RixShadingInterface {
  k_RixInvalid = 0, k_RixPattern, k_RixBxdfFactory, k_RixIntegratorFactory,
  k_RixLightFactory, k_RixLightFilter, k_RixProjectionFactory, k_RixDisplacementFactory,
  k_RixSampleFilter, k_RixDisplayFilter
}
 RixShadingInterface enumerates the known ShadingPlugin types. More...
 
enum  RixSCSyncMsg {
  k_RixSCRenderBegin, k_RixSCRenderEnd, k_RixSCInstanceEdit, k_RixSCCancel,
  k_RixSCCheckpointRecover, k_RixSCCheckpointWrite, k_RixSCIncrementBarrier
}
 RixSCSyncMsgs - are the possible states delivered through Synchronize methods. More...
 
enum  RixSCType {
  k_RixSCInvalidType = 0, k_RixSCAnyType, k_RixSCInteger, k_RixSCFloat,
  k_RixSCFloat2, k_RixSCFloat3, k_RixSCColor, k_RixSCPoint,
  k_RixSCVector, k_RixSCNormal, k_RixSCMatrix, k_RixSCString,
  k_RixSCBxdf, k_RixSCLightFilter, k_RixSCStructBegin, k_RixSCStructEnd,
  k_RixSCSampleFilter, k_RixSCDisplayFilter, k_RixSCNumTypes
}
 RixSCType enumerates the valid atomic datatypes. More...
 
enum  RixSCDetail { k_RixSCInvalidDetail = 0, k_RixSCUniform, k_RixSCVarying, k_RixSCAnyDetail }
 RixSCDetail enumerates the valid sizing qualifiers for SC parameters. More...
 
enum  RixSCAccess {
  k_RixSCInput = 0, k_RixSCOutput = 1 << 0, k_RixSCPresenceInput = 1 << 1, k_RixSCOpacityInput = 1 << 2,
  k_RixSCScatterInput = 1 << 3, k_RixSCVolumeTransmissionInput = 1 << 4, k_RixSCVolumeScatterInput = 1 << 5, k_RixSCDisplacementInput = 1 << 6,
  k_RixSCEmissionInput = 1 << 7, k_RixSCInvalidAccess = 0xFF
}
 RixSCAccess characterizes parameters as input or output. More...
 
enum  RixSCVolumeSelector { k_RixSCAnyVolume, k_RixSCIncidentVolume, k_RixSCOppositeVolume, k_RixSCSubsurfaceVolume }
 RixSCVolumeSelector identifies a volume region relative to an incident rays. More...
 
enum  RixSCConnectionInfo { k_RixSCDefaultValue = 0, k_RixSCParameterListValue, k_RixSCNetworkValue }
 RixSCConnectionInfo identifies the origin of values associated with parameters evaluated through RixShadingContext. More...
 
enum  RayProperty {
  k_RayDepth, k_RayRngSampleCtx, k_RayThruput, k_RayVolumeScatterCount,
  k_RayVolumeSampleCount, k_RayTrueDepth
}
 There are a set of 'properties' of a ray the integrator could provide the bxdf that can potentially provide significant opportunities for performance gain (even though the results might be biased). More...
 
enum  RixSCShadingMode {
  k_RixSCInvalidShadingMode, k_RixSCPresenceQuery, k_RixSCOpacityQuery, k_RixSCScatterQuery,
  k_RixSCVolumeTransmissionQuery, k_RixSCVolumeScatterQuery, k_RixSCBakePatternQuery, k_RixSCBakeQuery = k_RixSCBakePatternQuery,
  k_RixSCDisplacementQuery, k_RixSCEmissionQuery, k_RixSCBakeIntegratorQuery, k_RixSCNumShadingModes
}
 RixSCShadingMode conveys the current operating mode associated with the shading context. More...
 

Functions

PRMAN_INLINE size_t GetRixSCTypeSize (RixSCType type)
 Gets the storage size for the valid atomic datatypes. More...
 

Macro Definition Documentation

◆ k_RixShadingVersion

#define k_RixShadingVersion   240

Enumeration Type Documentation

◆ RayProperty

There are a set of 'properties' of a ray the integrator could provide the bxdf that can potentially provide significant opportunities for performance gain (even though the results might be biased).

We expect this enum to grow over time.

Enumerator
k_RayDepth 
k_RayRngSampleCtx 
k_RayThruput 
k_RayVolumeScatterCount 
k_RayVolumeSampleCount 
k_RayTrueDepth 

◆ RixSCAccess

RixSCAccess characterizes parameters as input or output.

To allow the renderer to further optimize execution, a parameter can be given a more informative input label that indicates the shading modes in which the input is required. A value of k_RixSCInput assumes it is required in all shading modes. The values of the enumeration are such that they can be combined with the 'or' operator (RixSCAccess)((int)k_RixSCPresenceInput | (int)k_RixSCOpacityInput) to indicate an input will be needed in multiple shading modes. Currently, these input modes are only supported in a static parameter table, not the dynamic parameter table returned by CreateInstanceData

Enumerator
k_RixSCInput 
k_RixSCOutput 
k_RixSCPresenceInput 
k_RixSCOpacityInput 
k_RixSCScatterInput 
k_RixSCVolumeTransmissionInput 
k_RixSCVolumeScatterInput 
k_RixSCDisplacementInput 
k_RixSCEmissionInput 
k_RixSCInvalidAccess 

◆ RixSCConnectionInfo

RixSCConnectionInfo identifies the origin of values associated with parameters evaluated through RixShadingContext.

Enumerator
k_RixSCDefaultValue 
k_RixSCParameterListValue 
k_RixSCNetworkValue 

◆ RixSCDetail

RixSCDetail enumerates the valid sizing qualifiers for SC parameters.

Enumerator
k_RixSCInvalidDetail 
k_RixSCUniform 
k_RixSCVarying 
k_RixSCAnyDetail 

◆ RixSCShadingMode

RixSCShadingMode conveys the current operating mode associated with the shading context.

Associated with a mode is s shader whose type may depend upon it. Knowledge of the shading mode allows a BxdfFactory to minimize the construction costs of the particular query. For example, a stained-glass material may be trivially opaque to presence queries but colored for Transmission queries. See comments for each Begin method for more details.

Enumerator
k_RixSCInvalidShadingMode 

Invalid shading context.

k_RixSCPresenceQuery 

RixBxdfFactory::BeginOpacity presence mode.

k_RixSCOpacityQuery 

RixBxdfFactory::BeginOpacity opacity mode.

k_RixSCScatterQuery 

RixBxdfFactory::BeginScatter mode.

k_RixSCVolumeTransmissionQuery 

RixBxdfFactory::BeginInterior mode.

k_RixSCVolumeScatterQuery 

RixBxdfFactory::BeginScatter mode.

k_RixSCBakePatternQuery 

Texture baking mode.

k_RixSCBakeQuery 
k_RixSCDisplacementQuery 

RixDisplacementFactory::BeginDisplacement mode.

k_RixSCEmissionQuery 

PxrMeshLight emission mode.

k_RixSCBakeIntegratorQuery 

Illumination baking mode.

k_RixSCNumShadingModes 

Number of shading modes.

◆ RixSCSyncMsg

RixSCSyncMsgs - are the possible states delivered through Synchronize methods.

Enumerator
k_RixSCRenderBegin 
k_RixSCRenderEnd 
k_RixSCInstanceEdit 
k_RixSCCancel 
k_RixSCCheckpointRecover 
k_RixSCCheckpointWrite 
k_RixSCIncrementBarrier 

◆ RixSCType

enum RixSCType

RixSCType enumerates the valid atomic datatypes.

Enumerator
k_RixSCInvalidType 
k_RixSCAnyType 
k_RixSCInteger 
k_RixSCFloat 
k_RixSCFloat2 
k_RixSCFloat3 
k_RixSCColor 
k_RixSCPoint 
k_RixSCVector 
k_RixSCNormal 
k_RixSCMatrix 
k_RixSCString 
k_RixSCBxdf 
k_RixSCLightFilter 
k_RixSCStructBegin 
k_RixSCStructEnd 
k_RixSCSampleFilter 
k_RixSCDisplayFilter 
k_RixSCNumTypes 

◆ RixSCVolumeSelector

RixSCVolumeSelector identifies a volume region relative to an incident rays.

Enumerator
k_RixSCAnyVolume 
k_RixSCIncidentVolume 
k_RixSCOppositeVolume 
k_RixSCSubsurfaceVolume 

◆ RixShadingInterface

RixShadingInterface enumerates the known ShadingPlugin types.

Enumerator
k_RixInvalid 
k_RixPattern 
k_RixBxdfFactory 
k_RixIntegratorFactory 
k_RixLightFactory 
k_RixLightFilter 
k_RixProjectionFactory 
k_RixDisplacementFactory 
k_RixSampleFilter 
k_RixDisplayFilter 

◆ RtHitSides

enum RtHitSides
Enumerator
k_SidesFront 
k_SidesBack 
k_SidesBoth 

Function Documentation

◆ GetRixSCTypeSize()