The doc says for
In some use cases, register consumption can be reduced by writing optixUndefinedValue() to payload values that are no longer used.
I’m bit curious if writing
optixUndefinedValue() to a payload value before
optixTrace() becomes some help for the compiler to generate better code.
float3 color; // undefined value here, will be written during the optixTrace() (closest-hit or any-hit and so on) optixTrace(..., (uint32_t&)color.x, (uint32_t&)color.y, (uint32_t&)color.z)
I mean writing
optixUndefinedValue() (with some casting) to
In addition to this,
I’d like to know the case the doc originally intended to say.
Could you provide some brief example?