Nuke binary plugins 15.1.3
 
Loading...
Searching...
No Matches
slr::ShadingLayerReq Struct Reference

#include <SlrShadingContext.h>

Public Member Functions

bool empty () const
 Request is considered invalid if number of channels requested is > 4.
 
 operator bool () const
 
bool operator== (const ShadingLayerReq &b) const
 
bool operator!= (const ShadingLayerReq &b) const
 
bool operator< (const ShadingLayerReq &b) const
 
 ShadingLayerReq (const usg::Token &_name, int32_t n, bool _interp=false)
 Removes any leading 'primvars:' before setting name.
 
 ShadingLayerReq (const char *_name, int32_t n, bool _interp=false)
 Removes any leading 'primvars:' before setting name.
 

Public Attributes

usg::Token name
 Requested layer name (if primvar this is -without- the leading 'primvars:')
 
int32_t nChans
 Number of channels, between 1..4. Requests with > 4 chans will be ignored.
 
bool interp
 Does shading layer interpolate across primitives? Ignored for primvar layers.
 

Detailed Description

Used to communicate the name and channel count of layers that shaders are requesting as primvars or writable shading layers.

Note when requesting primvars the name should -not- contain the leading 'primars:' of the source attribute. For example if requesting the displayColor primvar then name should be 'displayColor' and -not- 'primvars:displayColor'. if it's more convenient to use the attribute names with the leading 'primvars:' then use the constructors which will strip off any leading 'primvars:'.

The channel count -must- be within 1..4, channel counts > 4 or < 1 are ignored. If 'interp' is true then additional '<name>_Dx' and '<name>_Dy' shading layers are requested with the same channel count. This is ignored when primvar sample layers are being requested as the primvar interpolation type is used.



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com