RenderManAPI  24.0
PxrGeoAovs.h
Go to the documentation of this file.
1 /*
2 # ------------------------------------------------------------------------------
3 #
4 # Copyright (c) 1986-2019 Pixar. All rights reserved.
5 #
6 # The information in this file (the "Software") is provided for the exclusive
7 # use of the software licensees of Pixar ("Licensees"). Licensees have the
8 # right to incorporate the Software into other products for use by other
9 # authorized software licensees of Pixar, without fee. Except as expressly
10 # permitted herein, the Software may not be disclosed to third parties, copied
11 # or duplicated in any form, in whole or in part, without the prior written
12 # permission of Pixar.
13 #
14 # The copyright notices in the Software and this entire statement, including the
15 # above license grant, this restriction and the following disclaimer, must be
16 # included in all copies of the Software, in whole or in part, and all permitted
17 # derivative works of the Software, unless such copies or derivative works are
18 # solely in the form of machine-executable object code generated by a source
19 # language processor.
20 #
21 # PIXAR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL PIXAR BE
23 # LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
25 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. IN NO CASE WILL
27 # PIXAR'S TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR IN CONNECTION WITH
28 # THE USE OR PERFORMANCE OF THIS SOFTWARE EXCEED $50.
29 #
30 # Pixar
31 # 1200 Park Ave
32 # Emeryville CA 94608
33 #
34 # ------------------------------------------------------------------------------
35 */
36 
37 #ifndef pxrgeoaovs_h
38 #define pxrgeoaovs_h
39 
40 #include "RixIntegrator.h"
41 #include "RixPredefinedStrings.hpp"
42 #include "RixBxdf.h"
43 #include "RixShading.h"
44 #include "RixShadingUtils.h"
45 
46 namespace PxrGeoAOV
47 {
48 // NOTE: The order of PxrGeoAovIds and s_aovNames MUST match.
49 // Moreover, __Pworld must be listed BEFORE __depth, so we may
50 // be able to reuse __Pworld's Y component in __depth.
51 
53 {
54  k_Pworld = RixShadingContext::k_numBuiltinVars, // the ones before are defined in
55  // RixShadingContext::BuiltinVar
65 };
66 
67 // The order of all of the built in vars must match the order and content of
68 // RixShadingContext::BuiltinVar
69 static const RtUString s_aovNames[k_numGeoAovs] = {RtUString("P"),
70  RtUString("PRadius"),
71  RtUString("Po"),
72  RtUString("Nn"),
73  RtUString("Ngn"),
74  RtUString("Non"),
75  RtUString("Tn"),
76  RtUString("Vn"),
77  RtUString("VLen"),
78  RtUString("curvature"),
79  RtUString("incidentRaySpread"),
80  RtUString("incidentRayRadius"),
81  RtUString("incidentLobeSampled"),
82  RtUString("mpSize"),
83  RtUString("biasR"),
84  RtUString("biasT"),
85  RtUString("geomShadowTermBias"),
86  RtUString("u"),
87  RtUString("v"),
88  RtUString("w"),
89  RtUString("du"),
90  RtUString("dv"),
91  RtUString("dw"),
92  RtUString("dPdu"),
93  RtUString("dPdv"),
94  RtUString("dPdw"),
95  RtUString("dPdtime"),
96  RtUString("time"),
97  RtUString("id"),
98  RtUString("id2"),
99  RtUString("outsideIOR"),
100  RtUString(""), // Deliberately empty - Oi output should not be handled here!
101  RtUString("lpeState"),
102  RtUString("launchShadingCtxId"),
103  RtUString("motionFore"),
104  RtUString("motionBack"),
105  RtUString("curvature_u"),
106  RtUString("curvature_v"),
107  RtUString("dPcameradtime"),
108  RtUString("wavelength"),
109  RtUString("Naon"),
110  RtUString("__Pworld"),
111  RtUString("__Nworld"),
112  RtUString("__depth"),
113  RtUString("__st"),
114  RtUString("__Pref"),
115  RtUString("__WPref"),
116  RtUString("__Nref"),
117  RtUString("__WNref"),
118  RtUString("__faceindex")};
119 
120 // Geometric AOV output can be entirely disabled by emitting:
121 // Option "user" "int disableIntegratorAOVs" [1]
122 //
123 // If you want your integrator to support this option, you need to explicitely
124 // use that function to check its value.
125 //
126 inline bool disableIntegratorAOVs(RixContext& ctx, RixChannelId*& aovIdList)
127 {
129  RtInt count = 0, value = 0;
131  const static RtUString US_USER_DISABLEINTEGRATORAOVS("user:disableIntegratorAOVs");
132  RtInt ret = rstate->GetOption(
133  US_USER_DISABLEINTEGRATORAOVS, &value, sizeof(RtInt), &type, &count);
134  if (ret == 0 && count == 1 && value == 1)
135  {
136  aovIdList = NULL;
137  return true;
138  }
139  return false;
140 }
141 
142 // This method should be called in RenderBegin as this is a one-time operation.
143 // If our AOVs have been requested, their channel ids will be stored in
144 // aovIdList. If not, aovIdList will be NULL to signal the fact that there is
145 // nothing to output.
146 //
148 {
149  if (!aovIdList)
150  {
151  aovIdList = new RixChannelId[k_numGeoAovs];
152  }
153 
154  // set all channels to un-requested
155  for (int i = 0; i < k_numGeoAovs; i++) aovIdList[i] = k_InvalidChannelId;
156 
157  // Get displays
158  RtInt numDisplays = env.numDisplays;
159  RixDisplayChannel const* displayChannels = env.displays;
160 
161  int const entries = sizeof( s_aovNames ) / sizeof( s_aovNames[ 0 ] );
162  // If the line immediately following fails to compile, it likely means that
163  // the table above is out of sync with RixShadingContext::BuiltinVar.
164  // Change the magic number 9 when adding another geoaov
165  static_assert(entries == RixShadingContext::k_numBuiltinVars + 9,
166  "s_aovNames out of sync with RixShadingContext::BuiltinVar");
167 
168  // parse the channels
169  int numRequestedAOVs = 0;
170  for (int dc = 0; dc < numDisplays; ++dc)
171  {
172  for (int n = 0; n < k_numGeoAovs; n++)
173  {
174  if (!s_aovNames[n].Empty() && displayChannels[dc].channel == s_aovNames[n])
175  {
176  // store the channel id in the correct aov slot
177  aovIdList[n] = displayChannels[dc].id;
178  ++numRequestedAOVs;
179  break;
180  }
181  }
182  }
183 
184  // no requested AOVs : de-allocate and set to NULL.
185  // This is an early out signal.
186  if (!numRequestedAOVs)
187  {
188  delete[] aovIdList;
189  aovIdList = NULL;
190  }
191 }
192 
193 // Returns true if we need temp float memory.
194 //
195 inline bool NeedTempFloat(RixChannelId* aovIdList)
196 {
197  assert(aovIdList != NULL);
198  return (aovIdList[k_Pworld] != k_InvalidChannelId && aovIdList[k_depth] != k_InvalidChannelId);
199 }
200 
201 //
202 inline void Splat(
203  RtInt numShadingContexts,
204  RixShadingContext const** sctxs,
205  RixDisplayServices* dspsvc,
206  RtFloat3* aovValue,
207  RtFloat* savedFloat,
208  RixChannelId* aovIdList,
209  RixBXLobeTraits const* lobesWanted = NULL,
210  RtUString coordinateSystem = Rix::k_camera)
211 {
212  // we are NEVER expecting aovIdList == NULL
213  // as it is our signal to skip this function.
214  assert(aovIdList != NULL);
215  assert(aovValue != NULL);
216 
217  // we get multiple shading contexts : go through them one by one.
218  for (int g = 0; g < numShadingContexts; g++)
219  {
220  RixShadingContext const& sctx = *sctxs[g];
221 
222  // no geometry hit : move along
223  if (!sctx.HasHits()) continue;
224 
225  if (RixIsMatte(sctx) > 0) continue;
226 
227  // Should only write for 'camera hits' during integration.
228  // Camera hits are normally the first hits, or for volumes,
229  // the first scattering event.
230  int* rayDepths = new int[sctx.numPts];
231  bool write = false;
232  if (sctx.GetProperty(k_RayDepth, rayDepths))
233  {
234  if (rayDepths[0] == 0)
235  {
236  RixBxdf& bxdf = *(sctx.GetBxdf());
237  if (!bxdf.GetAllLobeTraits().GetContinuation())
238  {
239  write = true;
240  }
241  }
242  }
243  else
244  {
245  write = true;
246  }
247  delete[] rayDepths;
248 
249  if (!write) continue;
250 
251  for (RtInt d = 0; d < k_numGeoAovs; d++)
252  {
253  if (aovIdList[d] != k_InvalidChannelId)
254  {
256  {
257  switch (d)
258  {
259  // Sometimes need to be transformed as Points
262  {
263  RtFloat3 const* p;
265 
266  if (coordinateSystem)
267  {
268  // we need to operate on copies
269  memcpy(aovValue, p, sctx.numPts * sizeof(RtFloat3));
270  // transform copy to specified space
271  sctx.Transform(
273  Rix::k_current,
274  coordinateSystem,
275  aovValue);
276  p = aovValue;
277  }
278 
279  for (int i = 0; i < sctx.numPts; i++)
280  {
281  if (lobesWanted && !lobesWanted[i].GetValid())
282  {
283  // Currently only single scattered volumes would
284  // have a non-NULL lobesWanted sent into this call, where
285  // lobesWanted set to none suggests no scattering event
286  // occurred and we do not want to splat.
287  continue;
288  }
289  dspsvc->Write(
290  aovIdList[d], sctx.integratorCtxIndex[i], (RtColorRGB)p[i]);
291  }
292  break;
293  }
294 
295  // Sometimes need to be transformed as Vectors
301  {
302  RtFloat3 const* p;
304 
305  if (coordinateSystem)
306  {
307  // we need to operate on copies
308  memcpy(aovValue, p, sctx.numPts * sizeof(RtFloat3));
309  // transform copy to specified space
310  sctx.Transform(
312  Rix::k_current,
313  coordinateSystem,
314  aovValue);
315  p = aovValue;
316  }
317 
318  for (int i = 0; i < sctx.numPts; i++)
319  {
320  if (lobesWanted && !lobesWanted[i].GetValid())
321  {
322  // Currently only single scattered volumes would
323  // have a non-NULL lobesWanted sent into this call, where
324  // lobesWanted set to none suggests no scattering event
325  // occurred and we do not want to splat.
326  continue;
327  }
328  dspsvc->Write(
329  aovIdList[d], sctx.integratorCtxIndex[i], (RtColorRGB)p[i]);
330  }
331  break;
332  }
333 
336  {
337  RtFloat3 const* p;
339 
340  if (coordinateSystem)
341  {
342  // we need to operate on copies
343  memcpy(aovValue, p, sctx.numPts * sizeof(RtFloat3));
344  // transform copy to specified space
345  sctx.Transform(
347  Rix::k_current,
348  coordinateSystem,
349  aovValue);
350  p = aovValue;
351  }
352 
353  for (int i = 0; i < sctx.numPts; i++)
354  {
355  if (lobesWanted && !lobesWanted[i].GetValid())
356  {
357  // Currently only single scattered volumes would
358  // have a non-NULL lobesWanted sent into this call, where
359  // lobesWanted set to none suggests no scattering event
360  // occurred and we do not want to splat.
361  continue;
362  }
363  dspsvc->Write(
364  aovIdList[d], sctx.integratorCtxIndex[i], (RtColorRGB)p[i]);
365  }
366  break;
367  }
368 
369  // Sometimes need to be transformed as Normals
374  {
375  RtFloat3 const* p;
377 
378  if (coordinateSystem)
379  {
380  // we need to operate on copies
381  memcpy(aovValue, p, sctx.numPts * sizeof(RtFloat3));
382  // transform copy to specified space
383  sctx.Transform(
385  Rix::k_current,
386  coordinateSystem,
387  aovValue);
388  p = aovValue;
389  }
390 
391  for (int i = 0; i < sctx.numPts; i++)
392  {
393  if (lobesWanted && !lobesWanted[i].GetValid())
394  {
395  // Currently only single scattered volumes would
396  // have a non-NULL lobesWanted sent into this call, where
397  // lobesWanted set to none suggests no scattering event
398  // occurred and we do not want to splat.
399  continue;
400  }
401  dspsvc->Write(
402  aovIdList[d], sctx.integratorCtxIndex[i], (RtColorRGB)p[i]);
403  }
404  break;
405  }
406 
408  {
409  assert(0);
410  break;
411  }
412 
413  // No transforms ever needed
416  {
417  RtFloat3 const* p;
419  for (int i = 0; i < sctx.numPts; i++)
420  {
421  if (lobesWanted && !lobesWanted[i].GetValid())
422  {
423  // Currently only single scattered volumes would
424  // have a non-NULL lobesWanted sent into this call, where
425  // lobesWanted set to none suggests no scattering event
426  // occurred and we do not want to splat.
427  continue;
428  }
429  dspsvc->Write(
430  aovIdList[d], sctx.integratorCtxIndex[i], (RtColorRGB)p[i]);
431  }
432  break;
433  }
434 
454  {
455  RtFloat const* p;
457  for (int i = 0; i < sctx.numPts; i++)
458  {
459  dspsvc->Write(aovIdList[d], sctx.integratorCtxIndex[i], p[i]);
460  }
461  break;
462  }
467  {
468  int numDisplays;
469  RixDisplayChannel const* displays;
470  dspsvc->GetDisplayChannels(&numDisplays, &displays);
471  bool asInt = false;
472  for (int i = 0; i < numDisplays; i++)
473  {
474  if (displays[i].id == aovIdList[d])
475  {
476  asInt = (displays[i].type == RixDisplayChannel::k_IntegerChannel);
477  break;
478  }
479  }
480  RtInt const* p;
482  if (asInt)
483  for (int i = 0; i < sctx.numPts; i++)
484  dspsvc->Write(aovIdList[d], sctx.integratorCtxIndex[i], p[i]);
485  else
486  for (int i = 0; i < sctx.numPts; i++)
487  dspsvc->Write(
488  aovIdList[d],
489  sctx.integratorCtxIndex[i],
490  static_cast<float>(p[i]));
491  break;
492  }
494  {
495  // Undefined to write a pointer to an AOV.
496  assert(true == false);
497  break;
498  }
499  default: break;
500  }
501  }
502  else
503  {
504  switch (d)
505  {
506  case k_Pworld:
507  {
508  // Get P in current space
509  RtFloat3 const* tmpP;
511 
512  // we can not transform the original P : we must operate
513  // on a copy.
514  memcpy(aovValue, tmpP, sctx.numPts * sizeof(RtFloat3));
515 
516  // transform copy to world space
517  sctx.Transform(
518  RixShadingContext::k_AsPoints, Rix::k_current, Rix::k_world, aovValue);
519 
520  // if __depth has also been requested, save Y position
521  // in world space
522  for (int i = 0; i < sctx.numPts; i++)
523  {
524  dspsvc->Write(
525  aovIdList[d], sctx.integratorCtxIndex[i], (RtColorRGB)aovValue[i]);
526  if (aovIdList[k_depth] != k_InvalidChannelId)
527  savedFloat[i] = aovValue[i][1];
528  }
529  break;
530  }
531  case k_Nworld:
532  {
533  // Get Nn in current space
534  RtFloat3 const* tmpN;
536 
537  // we can not transform the original N : we must operate
538  // on a copy.
539  memcpy(aovValue, tmpN, sctx.numPts * sizeof(RtFloat3));
540 
541  sctx.Transform(
542  RixShadingContext::k_AsNormals, Rix::k_current, Rix::k_world, aovValue);
543 
544  for (int i = 0; i < sctx.numPts; i++)
545  {
546  dspsvc->Write(
547  aovIdList[d],
548  sctx.integratorCtxIndex[i],
549  (RtColorRGB)(aovValue[i]));
550  }
551  break;
552  }
553  case k_depth:
554  {
555  int* rayTrueDepths = new int[sctx.numPts];
556  bool haveTrueDepths = sctx.GetProperty(k_RayTrueDepth, rayTrueDepths);
557  RtFloat3 const* tmpP = nullptr;
558  RixIntegratorContext *iCtx = nullptr;
559  if (haveTrueDepths)
560  {
562  iCtx = sctx.GetIntegratorContext();
563  }
564  // depth from camera
565  RtFloat const* tmpf;
567  RtFloat3 const* Nn;
569  RtFloat3 const* Vn;
571 
572  // Y position in world space
573  bool PworldNotComputed = (aovIdList[k_Pworld] == k_InvalidChannelId);
574  if (PworldNotComputed)
575  {
577 
578  // we can not transform the original P : we must
579  // operate on a copy.
580  memcpy(aovValue, tmpP, sctx.numPts * sizeof(RtFloat3));
581 
582  // transform copy to world space
583  sctx.Transform(
585  Rix::k_current,
586  Rix::k_world,
587  aovValue);
588  }
589  RtColorRGB depth;
590  for (int i = 0; i < sctx.numPts; i++)
591  {
592  float VLen;
593  // If the true depth of the shading
594  // context is not zero, VLen might not be
595  // the actual desired camera depth, it may
596  // only be the distance to the previous
597  // hit. Here we recompute an actual
598  // distance from the hit point to the
599  // origin of the camera ray.
600  if (haveTrueDepths && rayTrueDepths[i] != 0)
601  {
602  VLen = RtVector3(tmpP[i] - iCtx->primaryRays[sctx.integratorCtxIndex[i]].origin).Length();
603  }
604  else
605  {
606  VLen = tmpf[i];
607  }
608  if (PworldNotComputed)
609  {
610  depth = RtColorRGB(VLen, aovValue[i][1], AbsDot(Nn[i], Vn[i]));
611  }
612  else
613  {
614  depth = RtColorRGB(VLen, savedFloat[i], AbsDot(Nn[i], Vn[i]));
615  }
616  dspsvc->Write(aovIdList[d], sctx.integratorCtxIndex[i], depth);
617  }
618  delete[] rayTrueDepths;
619  break;
620  }
621  case k_st:
622  {
623  RtFloat2 const* st;
624  RtFloat2 defaultST(0.0f, 0.0f);
625  sctx.GetPrimVar(Rix::k_st, defaultST, &st);
626  for (int i = 0; i < sctx.numPts; i++)
627  {
628  dspsvc->Write(
629  aovIdList[d],
630  sctx.integratorCtxIndex[i],
631  RtColorRGB(st[i].x, st[i].y, 0.f));
632  }
633  break;
634  }
635  case k_Pref:
636  case k_WPref:
637  case k_Nref:
638  case k_WNref:
639  {
640  RtFloat3 const* p;
641  RixSCDetail pDetail = sctx.GetPrimVar(s_aovNames[d], RtFloat3(0.0f), &p);
642  if (pDetail == k_RixSCVarying)
643  {
644  // we need to operate on copies
645  memcpy(aovValue, p, sctx.numPts * sizeof(RtFloat3));
646 
653  if (d == k_Pref || d == k_WPref)
655  else
657 
658  sctx.Transform(interp, Rix::k_current, Rix::k_object, aovValue, NULL);
659  p = aovValue;
660 
661  for (int i = 0; i < sctx.numPts; i++)
662  {
663  dspsvc->Write(
664  aovIdList[d], sctx.integratorCtxIndex[i], (RtColorRGB)p[i]);
665  }
666  }
667  break;
668  }
669  case k_faceindex:
670  {
671  float const* p = nullptr;
672  sctx.GetPrimVar(Rix::k_faceindex, 0.0f, &p);
673  if (p)
674  {
675  int numDisplays;
676  RixDisplayChannel const* displays;
677  dspsvc->GetDisplayChannels(&numDisplays, &displays);
678  bool asInt = false;
679  for (int i = 0; i < numDisplays; i++)
680  {
681  if (displays[i].id == aovIdList[d])
682  {
683  asInt = (displays[i].type == RixDisplayChannel::k_IntegerChannel);
684  break;
685  }
686  }
687  for (int i = 0; i < sctx.numPts; i++)
688  {
689  if (asInt)
690  dspsvc->Write(aovIdList[d], sctx.integratorCtxIndex[i],
691  static_cast<int>(p[i]));
692  else
693  dspsvc->Write(aovIdList[d], sctx.integratorCtxIndex[i], p[i]);
694  }
695  }
696  break;
697  }
698  } // switch
699  } // else
700  } // if requested aov
701  } // iterate over aov list
702  } // iterate over shading contexts
703 }
704 
705 } // namespace PxrGeoAOV
706 
707 #endif
RixBxdf * GetBxdf() const
Definition: RixShading.h:746
Surface V parameterization (type float)
Definition: RixShading.h:959
PRMAN_INLINE int RixIsMatte(RixShadingContext const &sCtx)
Definition: RixShadingUtils.h:1486
RixShadingContext is analogous to a RenderMan grid - it is a group of 1 or more points that may be sh...
Definition: RixShading.h:663
This class allows integrators to instrospect the rendering environment.
Definition: RixIntegrator.h:473
Bias to apply for transmitted rays (type float)
Definition: RixShading.h:956
void Splat(RtInt numShadingContexts, RixShadingContext const **sctxs, RixDisplayServices *dspsvc, RtFloat3 *aovValue, RtFloat *savedFloat, RixChannelId *aovIdList, RixBXLobeTraits const *lobesWanted=NULL, RtUString coordinateSystem=Rix::k_camera)
Definition: PxrGeoAovs.h:202
Definition: RixShading.h:501
Definition: RixShading.h:1117
virtual bool Write(RixChannelId id, int iCtxIndex, float const value)=0
Write() is similar to Splat(), except that it overwrites the existing value instead of accumulating...
virtual bool GetProperty(RayProperty, void const *) const
As long as the RixIntegrator used supports the appropriate ray property query, shading plugin authors...
Definition: RixShading.h:1100
Current LPE State (type RixLPEState)
Definition: RixShading.h:976
Surface W parameterization (type float)
Definition: RixShading.h:960
RtRayGeometry * primaryRays
The primary camera rays.
Definition: RixIntegrator.h:625
PRMAN_INLINE bool GetContinuation() const
Definition: RixBxdfLobe.h:1004
virtual int GetOption(RtUString const name, void *result, int resultLength, Type *resultType, int *resultCount)=0
GetAttribute, GetOption, return the current values of the named Attribute or Option.
Definition: PxrGeoAovs.h:60
pxrcore::ColorRGB RtColorRGB
Definition: RiTypesHelper.h:520
Rix interfaces are obtained from an RixContext.
Definition: RixInterfaces.h:172
BuiltinVar
Definition: RixShading.h:937
virtual int Transform(TransformInterpretation interp, const RtUString fromSpace, const RtUString toSpace, RtFloat3 *var, float *radius=NULL) const =0
Transform an array of RtFloat3 (and optional radius) the same size as the numPts in the RixShadingCon...
RixChannelId id
Definition: RixIntegrator.h:70
Definition: RixShading.h:436
Shading time, normalized between shutter open and close (type float)
Definition: RixShading.h:971
Definition: PxrGeoAovs.h:56
Definition: PxrGeoAovs.h:59
Instantaneous P velocity relative to the world (type RtFloat3)
Definition: RixShading.h:970
Ray footprint (radius) in W (type float)
Definition: RixShading.h:965
Definition: RixIntegrator.h:615
float RtFloat
Definition: ri.h:54
When raytracing, the ray footprint radius at P, otherwise the micropolygon radius (ie half mpSize) at...
Definition: RixShading.h:941
Backward 2D raster-space motion vector (type RtFloat3)
Definition: RixShading.h:979
RixSCDetail
RixSCDetail enumerates the valid sizing qualifiers for SC parameters.
Definition: RixShading.h:432
void GetChannelIds(RixIntegratorEnvironment &env, RixChannelId *&aovIdList)
Definition: PxrGeoAovs.h:147
Ray footprint (radius) in V (type float)
Definition: RixShading.h:963
Surface derivative in U (type RtFloat3)
Definition: RixShading.h:967
Opacity (type RtFloat3)
Definition: RixShading.h:975
Definition: PxrGeoAovs.h:54
Bias to apply for reflected rays (type float)
Definition: RixShading.h:955
RixBXLobeSampled id of incident rays (type int)
Definition: RixShading.h:953
Definition: RixShading.h:985
Instantaneous P velocity relative to the camera (type RtFloat3)
Definition: RixShading.h:982
virtual void GetBuiltinVar(BuiltinVar, int const **var) const =0
RixDisplayChannel const *const displays
Definition: RixIntegrator.h:556
Definition: RiTypesHelper.h:82
TransformInterpretation
Definition: RixShading.h:1113
Ray footprint (radius) in U (type float)
Definition: RixShading.h:961
Normalized shading normal (type RtFloat3)
Definition: RixShading.h:944
Spread of incident ray (type float): how much the ray radius increased for each unit distance the ray...
Definition: RixShading.h:951
Local principal surface curvature in u dir (type float)
Definition: RixShading.h:980
PxrGeoAovIds
Definition: PxrGeoAovs.h:52
pxrcore::Float3 RtFloat3
Definition: RiTypesHelper.h:69
Definition: RixIntegrator.h:82
Definition: RixShading.h:506
Surface U parameterization (type float)
Definition: RixShading.h:958
Definition: PxrGeoAovs.h:46
int numPts
numPts is the number of shading points.
Definition: RixShading.h:696
Definition: RixShading.h:1115
Undisplaced P (type RtFloat3)
Definition: RixShading.h:943
Definition: PxrGeoAovs.h:62
int * integratorCtxIndex
integratorCtxIndex maps indices to varying ShadingContext entries to the index associated with Integr...
Definition: RixShading.h:846
Local principal surface curvature in v dir (type float)
Definition: RixShading.h:981
virtual void GetDisplayChannels(int *numDisplays, RixDisplayChannel const **displays)=0
Gets a list of available display channels.
virtual RixInterface * GetRixInterface(RixInterfaceId id) const =0
Get the specified interface from this context.
Forward 2D raster-space motion vector (type RtFloat3)
Definition: RixShading.h:978
Definition: PxrGeoAovs.h:61
PRMAN_INLINE RixBXLobeTraits GetAllLobeTraits()
Definition: RixBxdf.h:545
Definition: PxrGeoAovs.h:58
Multiple methods of RixDisplayServices require similar parameters:
Definition: RixIntegrator.h:97
Radius of incident ray at P (type float)
Definition: RixShading.h:952
Definition: PxrGeoAovs.h:64
Shading position (type RtFloat3)
Definition: RixShading.h:940
RtPoint3 origin
Definition: RixIntegrator.h:247
enum RixDisplayChannel::ChannelType type
An interface for discovering the current state of the renderer.
Definition: RixInterfaces.h:777
Id for RixRenderState interface.
Definition: RixInterfaces.h:109
Normalized shading tangent (type RtFloat3)
Definition: RixShading.h:947
Normalized geometric normal (type RtFloat3)
Definition: RixShading.h:945
Parent ray shading context serialization (type int)
Definition: RixShading.h:977
Length of view vector (type float)
Definition: RixShading.h:949
Local mean surface curvature (type float)
Definition: RixShading.h:950
Definition: PxrGeoAovs.h:57
virtual RixSCDetail GetPrimVar(const RtUString name, RixSCType *type, int *arraylen) const =0
GetPrimVar: lazily evaluates the named primitive variable.
Surface derivative in V (type RtFloat3)
Definition: RixShading.h:968
Incident index of refraction (type float)
Definition: RixShading.h:974
Note that the same channel name may appear multiple times within a list of RixDisplayChannels.
Definition: RixIntegrator.h:68
Normalized undisplaced N (type RtFloat3)
Definition: RixShading.h:946
unsigned int RixChannelId
Definition: RixIntegrator.h:55
Attribute "identifier" "id2" (type int)
Definition: RixShading.h:973
Surface derivative in W (type RtFloat3)
Definition: RixShading.h:969
Attribute "identifier" "id" (type int)
Definition: RixShading.h:972
This struct represents the characteristics of potentially several lobes of a bxdf in aggregate...
Definition: RixBxdfLobe.h:178
bool HasHits() const
Definition: RixShading.h:737
bool NeedTempFloat(RixChannelId *aovIdList)
Definition: PxrGeoAovs.h:195
pxrcore::UString RtUString
Definition: RiTypesHelper.h:682
virtual RixIntegratorContext * GetIntegratorContext() const =0
Returns a reference to the RixIntegratorContext which created this shading context.
bool disableIntegratorAOVs(RixContext &ctx, RixChannelId *&aovIdList)
Definition: PxrGeoAovs.h:126
Micropolygon size; 0 for non-tessellated surfaces (type float)
Definition: RixShading.h:954
Bias to apply for shadow rays (Direct Light) to avoid the geometric shadow terminator.
Definition: RixShading.h:957
int const numDisplays
Display state (unmutable).
Definition: RixIntegrator.h:555
Type
Definition: RixInterfaces.h:140
RtFloat3 RtVector3
Definition: RiTypesHelper.h:72
Definition: RixShading.h:1116
Normalized view vector, points away from shading points (type RtFloat3)
Definition: RixShading.h:948
int RtInt
Definition: ri.h:55
Normalized analytical undisplaced N (type RtFloat3)
Definition: RixShading.h:984
Definition: RixBxdf.h:518
Definition: PxrGeoAovs.h:63