#include <RixIntegrator.h>
|
| void | InitOrigination (RixShadingContext const *sCtx, RtNormal3 const *Ngn, int _shadingCtxIndex) |
| | InitOrigination() should be called after the ray geometry has been setup for calls to GetNearestHits(). More...
|
| |
| void | InitTransmitOrigination (RixShadingContext const *sCtx, int _shadingCtxIndex) |
| | InitTransmission() is analogous to InitOrigination() but should be used for transmission rays. More...
|
| |
| void | SetRaySpread (RixBXLobeSampled lobe, float rayOriginRadius, float rayOriginSpread, float curvature, float fPdf, bool lightPath=false) |
| | Computes ray spread for given reflection/transmission type, pdf, and surface curvature, using two approaches: More...
|
| |
|
| static PRMAN_INLINE uint16_t | EncodeWavelength (float wavelength) |
| | Converts a wavelenght (in nanometers) to a compact 16 bits representation of it. More...
|
| |
| static PRMAN_INLINE float | DecodeWavelength (uint16_t encodedWavelength) |
| | Converts from encoded 16 bits representation of wavelength to nanometers In both units 0 means "full spectrum", meaning no wavelength is defined. More...
|
| |
| Enumerator |
|---|
| k_rtInvalid |
|
| k_rtCamera |
|
| k_rtLight |
|
| k_rtTransmission |
|
| k_rtDirectlight |
|
| k_rtIndirect |
|
| k_rtNumRayTypes |
|
| static PRMAN_INLINE float RtRayGeometry::DecodeWavelength |
( |
uint16_t |
encodedWavelength) | |
|
|
inlinestatic |
Converts from encoded 16 bits representation of wavelength to nanometers In both units 0 means "full spectrum", meaning no wavelength is defined.
- Parameters
-
| [in] | encodedWavelength | A 16-bits encoded wavelength |
- Returns
- the wavelength, in nanometers.
| static PRMAN_INLINE uint16_t RtRayGeometry::EncodeWavelength |
( |
float |
wavelength) | |
|
|
inlinestatic |
Converts a wavelenght (in nanometers) to a compact 16 bits representation of it.
In both units 0 means "full spectrum", meaning no wavelength is defined.
- Parameters
-
| [in] | wavelength | A wavelength in nanometers. |
- Returns
- a 16-bits encoded wavelength.
| void RtRayGeometry::InitOrigination |
( |
RixShadingContext const * |
sCtx, |
|
|
RtNormal3 const * |
Ngn, |
|
|
int |
_shadingCtxIndex |
|
) |
| |
|
inline |
InitOrigination() should be called after the ray geometry has been setup for calls to GetNearestHits().
In addition to setting the origination context, we analyze the combination of lobeSampled and Nn to determine whether a transmit event was a nominal enter or exit. Origination state allows rays to be back-tracked to the original shading context for recovery of ray-path information.
- Parameters
-
| [in] | sCtx | Shading context containing the shading point that launched this ray. |
| [in] | Ngn | Geometric normal at the shading point that launched this ray. |
| [in] | _shadingCtxIndex | Index of the shading point in the shading context. |
References RixShadingContext::integratorCtxIndex, and RixShadingContext::shadingCtxId.
| void RtRayGeometry::InitTransmitOrigination |
( |
RixShadingContext const * |
sCtx, |
|
|
int |
_shadingCtxIndex |
|
) |
| |
|
inline |
InitTransmission() is analogous to InitOrigination() but should be used for transmission rays.
All transmission 'events' are transmit events and lobeSampled is ill-defined (since lights are responsible for producing most transmission rays).
- Parameters
-
| [in] | sCtx | Shading context containing the shading point that launched this ray. |
| [in] | _shadingCtxIndex | Index of the shading point in the shading context. |
References RixShadingContext::integratorCtxIndex, and RixShadingContext::shadingCtxId.
| void RtRayGeometry::SetRaySpread |
( |
RixBXLobeSampled |
lobe, |
|
|
float |
rayOriginRadius, |
|
|
float |
rayOriginSpread, |
|
|
float |
curvature, |
|
|
float |
fPdf, |
|
|
bool |
lightPath = false |
|
) |
| |
|
inline |
Computes ray spread for given reflection/transmission type, pdf, and surface curvature, using two approaches:
- Ray spread based on roughness (pdf). The ray spread from a flat rough surface depends on roughness: the higher roughness the lower the pdf in a given direction; here we map the pdf to a ray spread using a heuristic mapping.
- Ray spread based on surface curvature. The ray spread for reflection from a curved smooth surface is simple to compute using Igehy's formula.
We set the overall ray spread to the max of these two. (For rough curved surfaces a better answer might be larger than the max – perhaps the sum? – but it's not 100% clear what the optimal combined value should be.)
- Parameters
-
| [in] | lobe | Used to determine if we are dealing with a reflection or transmission event. |
| [in] | rayOriginRadius | Incident ray radius at ray origin. |
| [in] | rayOriginSpread | Incident ray spread at ray origin. |
| [in] | curvature | Local surface curvature. |
| [in] | fPdf | Pdf associated with the ray direction. |
| [in] | lightPath | Indicates if the rays is part of a light path or not. Optional. |
References RixBXLobeSampled::GetReflect(), RixBXLobeSampled::GetSolidAngle(), RixBXLobeSampled::GetTransmit(), and RixIsFinite().
| RtVector3 RtRayGeometry::direction |
Radius of ray at its origin.
| uint16_t RtRayGeometry::flags |
Internal hit id, zero means 'no hit.'.
| uint16_t RtRayGeometry::hitId |
|
mutable |
This value is updated on each presence hit, whenever a surface with presence is hit.
The presence value will be compared against this threshold to decide if it is a hit or a miss.
| uint16_t RtRayGeometry::ignoreGroupingId |
If non-zero: ignore geometry with the specified Attribute "grouping" "id".
| int16_t RtRayGeometry::integratorCtxIndex |
Shading context unique identifier.
See RayType for possible values.
User-provided index in the ray bundle.
| float RtRayGeometry::maxDist |
Minimum hit distance. Used only for primary rays.
| float RtRayGeometry::minDist |
How much the ray radius changes for each unit the ray travels.
Use as is to get tex/env filter radii. Multiply by 2 to get footprints and tex/env filter diameters. Values range between 0 and 1 (where 1 corresponds to an angle of 45 degrees).
| float RtRayGeometry::opacityThreshold |
| RtPoint3 RtRayGeometry::origin |
| float RtRayGeometry::originRadius |
| float RtRayGeometry::pixelEstimate |
A pointer to the LPE state for this ray launch.
| uint32_t RtRayGeometry::privateData[4] |
Estimate of a pixel's intensity.
| uint16_t RtRayGeometry::rayId |
Index into the lauching shading context.
| float RtRayGeometry::raySpread |
| uint16_t RtRayGeometry::raytype |
Shutter-normalized time of ray launch.
Characteristics of the BxDF lobe this ray samples.
| uint16_t RtRayGeometry::shadingCtxIndex |
Associated primary ray index.
| float RtRayGeometry::time |
| uint16_t RtRayGeometry::wavelength |
The documentation for this struct was generated from the following file: