128 RtInt count = 0, value = 0;
130 const static RtUString US_USER_DISABLEINTEGRATORAOVS(
"user:disableIntegratorAOVs");
132 US_USER_DISABLEINTEGRATORAOVS, &value,
sizeof(
RtInt), &type, &count);
133 if (ret == 0 && count == 1 && value == 1)
154 for (
int i = 0; i <
k_numGeoAovs; i++) aovIdList[i] = k_InvalidChannelId;
160 int const entries =
sizeof( s_aovNames ) /
sizeof( s_aovNames[ 0 ] );
165 "s_aovNames out of sync with RixShadingContext::BuiltinVar");
168 int numRequestedAOVs = 0;
169 for (
int dc = 0; dc < numDisplays; ++dc)
173 if (displayChannels[dc].channel == s_aovNames[n])
176 aovIdList[n] = displayChannels[dc].
id;
185 if (!numRequestedAOVs)
196 assert(aovIdList != NULL);
197 return (aovIdList[
k_Pworld] != k_InvalidChannelId && aovIdList[
k_depth] != k_InvalidChannelId);
202 RtInt numShadingContexts,
213 assert(aovIdList != NULL);
214 assert(aovValue != NULL);
217 for (
int g = 0; g < numShadingContexts; g++)
229 int* rayDepths =
new int[sctx.
numPts];
233 if (rayDepths[0] == 0)
248 if (!write)
continue;
252 if (aovIdList[d] != k_InvalidChannelId)
265 if (coordinateSystem)
278 for (
int i = 0; i < sctx.
numPts; i++)
280 if (lobesWanted && !lobesWanted[i].GetValid())
304 if (coordinateSystem)
317 for (
int i = 0; i < sctx.
numPts; i++)
319 if (lobesWanted && !lobesWanted[i].GetValid())
339 if (coordinateSystem)
352 for (
int i = 0; i < sctx.
numPts; i++)
354 if (lobesWanted && !lobesWanted[i].GetValid())
377 if (coordinateSystem)
390 for (
int i = 0; i < sctx.
numPts; i++)
392 if (lobesWanted && !lobesWanted[i].GetValid())
413 for (
int i = 0; i < sctx.
numPts; i++)
415 if (lobesWanted && !lobesWanted[i].GetValid())
450 for (
int i = 0; i < sctx.
numPts; i++)
465 for (
int i = 0; i < numDisplays; i++)
467 if (displays[i].
id == aovIdList[d])
476 for (
int i = 0; i < sctx.
numPts; i++)
479 for (
int i = 0; i < sctx.
numPts; i++)
483 static_cast<float>(p[i]));
489 assert(
true ==
false);
515 for (
int i = 0; i < sctx.
numPts; i++)
519 if (aovIdList[
k_depth] != k_InvalidChannelId)
520 savedFloat[i] = aovValue[i][1];
537 for (
int i = 0; i < sctx.
numPts; i++)
548 int* rayTrueDepths =
new int[sctx.
numPts];
566 bool PworldNotComputed = (aovIdList[
k_Pworld] == k_InvalidChannelId);
567 if (PworldNotComputed)
583 for (
int i = 0; i < sctx.
numPts; i++)
593 if (haveTrueDepths && rayTrueDepths[i] != 0)
601 if (PworldNotComputed)
603 depth =
RtColorRGB(VLen, aovValue[i][1], AbsDot(Nn[i], Vn[i]));
607 depth =
RtColorRGB(VLen, savedFloat[i], AbsDot(Nn[i], Vn[i]));
611 delete[] rayTrueDepths;
619 for (
int i = 0; i < sctx.
numPts; i++)
654 for (
int i = 0; i < sctx.
numPts; i++)
664 float const* p =
nullptr;
672 for (
int i = 0; i < numDisplays; i++)
674 if (displays[i].
id == aovIdList[d])
680 for (
int i = 0; i < sctx.
numPts; i++)
684 static_cast<int>(p[i]));
Attribute "identifier" "id2" (type int)
PRMANAPI const RtUString k_camera
"camera"
virtual RixIntegratorContext * GetIntegratorContext() const =0
Instantaneous P velocity relative to the camera (type RtFloat3)
PRMAN_INLINE bool GetContinuation() const
Micropolygon size; 0 for non-tessellated surfaces (type float)
Normalized shading tangent (type RtFloat3)
Undisplaced P (type RtFloat3)
pxrcore::ColorRGB RtColorRGB
virtual RixSCDetail GetPrimVar(const RtUString name, RixSCType *type, int *arraylen) const =0
Id for RixRenderState interface.
PRMANAPI const RtUString k_faceindex
"__faceindex"
Local principal surface curvature in u dir (type float)
Local principal surface curvature in v dir (type float)
PRMANAPI const RtUString k_current
"current"
RixBxdf * GetBxdf() const
Attribute "identifier" "id" (type int)
Ray footprint (radius) in V (type float)
Normalized shading normal (type RtFloat3)
Instantaneous P velocity relative to the world (type RtFloat3)
Normalized undisplaced N (type RtFloat3)
Backward 2D raster-space motion vector (type RtFloat3)
virtual int GetOption(RtUString const name, void *result, int resultLength, Type *resultType, int *resultCount)=0
enum RixDisplayChannel::ChannelType type
PRMANAPI const RtUString k_st
"st"
Ray footprint (radius) in U (type float)
RtRayGeometry * primaryRays
The primary camera rays.
Surface derivative in U (type RtFloat3)
virtual bool Write(RixChannelId id, int iCtxIndex, float const value)=0
Surface derivative in W (type RtFloat3)
Bias to apply for transmitted rays (type float)
Radius of incident ray at P (type float)
An interface for discovering the current state of the renderer.
RixBXLobeSampled id of incident rays (type int)
Local mean surface curvature (type float)
Forward 2D raster-space motion vector (type RtFloat3)
Normalized view vector, points away from shading points (type RtFloat3)
void Splat(RtInt numShadingContexts, RixShadingContext const **sctxs, RixDisplayServices *dspsvc, RtFloat3 *aovValue, RtFloat *savedFloat, RixChannelId *aovIdList, RixBXLobeTraits const *lobesWanted=NULL, RtUString coordinateSystem=Rix::k_camera)
int const numDisplays
Display state (unmutable).
pxrcore::UString RtUString
Normalized analytical undisplaced N (type RtFloat3)
virtual int Transform(TransformInterpretation interp, const RtUString fromSpace, const RtUString toSpace, RtFloat3 *var, float *radius=NULL) const =0
Shading time, normalized between shutter open and close (type float)
Surface V parameterization (type float)
Parent ray shading context serialization (type int)
Ray footprint (radius) in W (type float)
PRMANAPI const RtUString k_object
"object"
Length of view vector (type float)
PRMAN_INLINE int RixIsMatte(RixShadingContext const &sCtx)
virtual void GetDisplayChannels(int *numDisplays, RixDisplayChannel const **displays)=0
Surface W parameterization (type float)
bool disableIntegratorAOVs(RixContext &ctx, RixChannelId *&aovIdList)
bool NeedTempFloat(RixChannelId *aovIdList)
Spread of incident ray (type float): how much the ray radius increased for each unit distance the ray...
Incident index of refraction (type float)
virtual bool GetProperty(RayProperty, void const *) const
Bias to apply for reflected rays (type float)
Surface U parameterization (type float)
Shading position (type RtFloat3)
unsigned int RixChannelId
PRMAN_INLINE RixBXLobeTraits GetAllLobeTraits()
Surface derivative in V (type RtFloat3)
virtual RixInterface * GetRixInterface(RixInterfaceId id) const =0
Current LPE State (type RixLPEState)
PRMANAPI const RtUString k_world
"world"
void GetChannelIds(RixIntegratorEnvironment &env, RixChannelId *&aovIdList)
Normalized geometric normal (type RtFloat3)
RixDisplayChannel const *const displays
virtual void GetBuiltinVar(BuiltinVar, int const **var) const =0