#include <RixIntegrator.h>
|
virtual bool | Splat (RixChannelId id, int iCtxIndex, float const value)=0 |
|
virtual bool | Splat (RixChannelId id, int iCtxIndex, RtColorRGB const value)=0 |
| The color version of RixDisplayServices::Splat(RixChannelId, int, float) . More...
|
|
virtual bool | SplatMulti (int nChans, RixChannelId const *ids, int iCtxIndex, float const value)=0 |
|
virtual bool | SplatMulti (int nChans, RixChannelId const *id, int iCtxIndex, RtColorRGB const value)=0 |
| The color version of RixDisplayServices::SplatMulti(int, RixChannelId*, int, float) . More...
|
|
virtual bool | Write (RixChannelId id, int iCtxIndex, float const value)=0 |
|
virtual bool | Write (RixChannelId id, int iCtxIndex, RtColorRGB const value)=0 |
| The color version of RixDisplayServices::Write(int, RixChannelId, float) . More...
|
|
virtual bool | Write (RixChannelId id, int iCtxIndex, int const value)=0 |
| The integer version of RixDisplayServices::Write(int, RixChannelId, float) . More...
|
|
virtual void | WriteDistance (int const iCtxIndex, float const distance, bool const isVolume=true, RixShadingContext const *sCtx=nullptr)=0 |
|
virtual void | WriteOpacity (RixChannelId id, int iCtxIndex, float const value)=0 |
|
virtual void | WriteOpacity (RixChannelId id, int iCtxIndex, RtColorRGB &value)=0 |
|
virtual void | SplatOpacity (RixChannelId id, int iCtxIndex, float const opacity)=0 |
|
virtual void | SplatOpacity (RixChannelId id, int iCtxIndex, RtColorRGB &opacity)=0 |
|
virtual int | AddSample (int iCtxIndex)=0 |
|
virtual void | GetDisplayChannels (int *numDisplays, RixDisplayChannel const **displays)=0 |
|
virtual void | DiscardIteration (bool redo=false)=0 |
|
Multiple methods of RixDisplayServices
require similar parameters:
- the id of the channel we want to write/splat a value to. This id is usually obtained by introspecting the list of
RixDisplayChannel
objects that can be retrieved from the RixIntegratorEnvironment
interface. This list can also be retrived by calling the method GetDisplayChannels()
.
- an integrator context index. This is the index of the primary ray associated with the sample. When looping over points in a
RixShadingContext
, this should be sCtx.integratorCtxIndex[i]
Most methods have two versions, differing only by the type of the provided value: float or color.
Definition at line 97 of file RixIntegrator.h.
◆ ~RixDisplayServices()
virtual RixDisplayServices::~RixDisplayServices |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ AddSample()
virtual int RixDisplayServices::AddSample |
( |
int |
iCtxIndex | ) |
|
|
pure virtual |
Creates and adds a new sample. This new sample will be located at the same screen position as the given sample. However, it may be assigned different values and hit distances. Use this to produce better deep images from transparency and volumes. The returned value can be used as the iCtxIndex
for the new sample in other calls or to add further samples.
Note: if there is anything in front of this new sample, the integrator is still responsible for attenuating any color and opacity splatted into it.
- Parameters
-
[in] | iCtxIndex | Integrator context index of the original sample. |
- Returns
- a new integrator context index that must be used when calling
Write()
or Splat()
methods for this additional sample.
◆ DiscardIteration()
virtual void RixDisplayServices::DiscardIteration |
( |
bool |
redo = false | ) |
|
|
pure virtual |
Cancels the results of any calls made to Splat()
, SplatMulti()
, and Write()
during this invocation of the integrator's Integrate()
or IntegrateRays()
method. This may be useful if an integrator produces poor estimates during a warmup period.
- Parameters
-
[in] | redo | If true, the renderer will retry the current integration with the same inputs. Optional. |
◆ GetDisplayChannels()
virtual void RixDisplayServices::GetDisplayChannels |
( |
int * |
numDisplays, |
|
|
RixDisplayChannel const ** |
displays |
|
) |
| |
|
pure virtual |
Gets a list of available display channels. These are normally provided to the integrator via the integration environment for it to inspect during startup. However, we provide access here during runtime for more dynamic applications such as patterns and bxdfs which would like to do "writeaov()"-like things.
- Parameters
-
[out] | numDisplays | Number of displays returned. |
[out] | displays | List of displays. Array of size numDisplays . |
◆ Splat() [1/2]
virtual bool RixDisplayServices::Splat |
( |
RixChannelId |
id, |
|
|
int |
iCtxIndex, |
|
|
float const |
value |
|
) |
| |
|
pure virtual |
Accumulates a value into a given display channel for a given path sample. This is accumulative; it may be called at each vertex along a light path to sum radiance thruput, for example.
Note: RixPattern
plug-ins should only write to display services during scatter queries. Users can check the shading context shading mode for k_RixSCScatterQuery
.
- Parameters
-
[in] | id | Id of the channel to write to. |
[in] | iCtxIndex | Integrator context index. |
[in] | value | The value to be splat. |
- Returns
- true on success (i.e. if channel exists for the camera currently being processed).
◆ Splat() [2/2]
◆ SplatMulti() [1/2]
virtual bool RixDisplayServices::SplatMulti |
( |
int |
nChans, |
|
|
RixChannelId const * |
ids, |
|
|
int |
iCtxIndex, |
|
|
float const |
value |
|
) |
| |
|
pure virtual |
The multi-channel version of Splat()
, taking a list of channels to accumulate to. The same value will be accumulated into each channel.
- Parameters
-
| nChans | Number of channels ids. |
| ids | Ids of the channels to write to. |
[in] | iCtxIndex | Integrator context index. |
[in] | value | The value to be splat. |
- Returns
- true on success (i.e. if all channel exists for the camera currently being processed).
◆ SplatMulti() [2/2]
virtual bool RixDisplayServices::SplatMulti |
( |
int |
nChans, |
|
|
RixChannelId const * |
id, |
|
|
int |
iCtxIndex, |
|
|
RtColorRGB const |
value |
|
) |
| |
|
pure virtual |
The color version of RixDisplayServices::SplatMulti(int, RixChannelId*, int, float)
.
◆ SplatOpacity() [1/2]
virtual void RixDisplayServices::SplatOpacity |
( |
RixChannelId |
id, |
|
|
int |
iCtxIndex, |
|
|
float const |
opacity |
|
) |
| |
|
pure virtual |
Accumulates a given opacity value into the sample, which will be pixel-filtered and blended to create the pixel alpha.
- Parameters
-
[in] | id | Id of the channel to write to. |
[in] | iCtxIndex | Integrator context index. |
[in] | opacity | The value to be written. |
◆ SplatOpacity() [2/2]
◆ Write() [1/3]
virtual bool RixDisplayServices::Write |
( |
RixChannelId |
id, |
|
|
int |
iCtxIndex, |
|
|
float const |
value |
|
) |
| |
|
pure virtual |
Write()
is similar to Splat()
, except that it overwrites the existing value instead of accumulating. This can be useful for AOVs that do not sum linearly.
The last write into the given channel will be the one that gets filtered into the pixel for this particular sample. It is up to the user to manage their shader networks to avoid plugins fighting over the value.
- Parameters
-
[in] | id | Id of the channel to write to. |
[in] | iCtxIndex | Integrator context index. |
[in] | value | The value to be written. |
- Returns
- true on success (i.e. if channel exists for the camera currently being processed).
◆ Write() [2/3]
The color version of RixDisplayServices::Write(int, RixChannelId, float)
.
◆ Write() [3/3]
virtual bool RixDisplayServices::Write |
( |
RixChannelId |
id, |
|
|
int |
iCtxIndex, |
|
|
int const |
value |
|
) |
| |
|
pure virtual |
The integer version of RixDisplayServices::Write(int, RixChannelId, float)
.
◆ WriteDistance()
virtual void RixDisplayServices::WriteDistance |
( |
int const |
iCtxIndex, |
|
|
float const |
distance, |
|
|
bool const |
isVolume = true , |
|
|
RixShadingContext const * |
sCtx = nullptr |
|
) |
| |
|
pure virtual |
Overwrites the existing hit distance and information. When using deep outputs, this must be called during volume integration for them to be correct.
Only one update can be saved per sample, so only the last call to WriteDistance()
for a given sample has an effect. Use AddSample()
with this if you'd like to have distinct samples at different distances.
- Parameters
-
[in] | iCtxIndex | Integrator context index. |
[in] | distance | This is not the distance to the outer envelope, but to a volume scattering or absorption event or to a non-volume object intersecting the volume. |
[in] | isVolume | Indicates if writing distance for a volume scattering event or not. |
[in] | sCtx | The shading context associated with the point for which we are writing the distance. This is necessary for RixSampleFilter::GetAttribute() to work properly. |
◆ WriteOpacity() [1/2]
virtual void RixDisplayServices::WriteOpacity |
( |
RixChannelId |
id, |
|
|
int |
iCtxIndex, |
|
|
float const |
value |
|
) |
| |
|
pure virtual |
Overwrites the current opacity value into the sample, which will be pixel-filtered and blended to create the pixel alpha.
- Parameters
-
[in] | id | Id of the channel to write to. |
[in] | iCtxIndex | Integrator context index. |
[in] | opacity | The value to be written. |
◆ WriteOpacity() [2/2]
The documentation for this class was generated from the following file: