API Documentation
Public Member Functions | List of all members
nkGraphics::RaytracingPass Class Reference

A raytracing pass. Dispatches rays, using hardware acceleration. More...

Inheritance diagram for nkGraphics::RaytracingPass:
nkGraphics::Pass nkExport::Exportable

Public Member Functions

RenderQueuegetRq () const
 
ShadergetRaygenMissShader () const
 
unsigned int getMaxTraceRecursionDepth () const
 
unsigned int getWidth () const
 
unsigned int getHeight () const
 
unsigned int getDepth () const
 
virtual void setRq (RenderQueue *value)
 
virtual void setRaygenMissShader (Shader *shader)
 
virtual void setMaxTraceRecursionDepth (unsigned int value)
 
void setWidth (unsigned int value)
 
void setHeight (unsigned int value)
 
void setDepth (unsigned int value)
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
- Public Member Functions inherited from nkGraphics::Pass
 Pass (System *system) noexcept
 
virtual ~Pass ()
 
System * getSystem () const
 
TargetOperationsgetParent () const
 
PASS_TYPE getType () const
 
nkMemory::StringView getName () const
 
void setParent (TargetOperations *parent)
 
void setName (nkMemory::StringView name)
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable () noexcept
 
virtual ~Exportable ()
 

Detailed Description

A raytracing pass. Dispatches rays, using hardware acceleration.

As a result, this is only supported on RTX and 10 series GPU for the moment.
See TargetOperations::addRaytracingPass() for use.

Member Function Documentation

◆ getRq()

RenderQueue* nkGraphics::RaytracingPass::getRq ( ) const
Returns
The render queue raytraced during the pass.

◆ getRaygenMissShader()

Shader* nkGraphics::RaytracingPass::getRaygenMissShader ( ) const
Returns
The ray generation and miss shader used.

◆ getMaxTraceRecursionDepth()

unsigned int nkGraphics::RaytracingPass::getMaxTraceRecursionDepth ( ) const
Returns
The max recursion depth used.

◆ getWidth()

unsigned int nkGraphics::RaytracingPass::getWidth ( ) const
Returns
The width of the dimensions of rays dispatched.

◆ getHeight()

unsigned int nkGraphics::RaytracingPass::getHeight ( ) const
Returns
The height of the dimensions of rays dispatched.

◆ getDepth()

unsigned int nkGraphics::RaytracingPass::getDepth ( ) const
Returns
The depth of the dimensions of rays dispatched.

◆ setRq()

virtual void nkGraphics::RaytracingPass::setRq ( RenderQueue value)
virtual

Sets the rendering queue to raytrace. Its acceleration structure is the one used for the dispatch.

Parameters
valueThe render queue to use.
Remarks
The queue should be marked as raytraced, using RenderQueue::setRaytraced(). Be sure to flag it, else the queue won't populate its acceleration structure.
This was made this way to be sure queues are only computing the acceleration structures when requested.

◆ setRaygenMissShader()

virtual void nkGraphics::RaytracingPass::setRaygenMissShader ( Shader shader)
virtual

Sets the ray generation and miss shader to use.

Parameters
shaderThe shader to use.

◆ setMaxTraceRecursionDepth()

virtual void nkGraphics::RaytracingPass::setMaxTraceRecursionDepth ( unsigned int  value)
virtual

Sets the maximum recursion depth possible within the pass. By default, this value is 1, meaning you can only call TraceRay once.

Parameters
valueThe maximum recursion depth.
Remarks
Be sure to keep the recursion inferior to this number. This is currently a young technology and not respecting this can lead to driver crashes.

◆ setWidth()

void nkGraphics::RaytracingPass::setWidth ( unsigned int  value)

Sets the width of the dimensions of rays to dispatch.

Parameters
valueThe width to use.

◆ setHeight()

void nkGraphics::RaytracingPass::setHeight ( unsigned int  value)

Sets the height of the dimensions of rays to dispatch.

Parameters
valueThe height to use.

◆ setDepth()

void nkGraphics::RaytracingPass::setDepth ( unsigned int  value)

Sets the depth of the dimensions of rays to dispatch.

Parameters
valueThe depth to use.

◆ exportClassToTree()

virtual void nkGraphics::RaytracingPass::exportClassToTree ( nkExport::Node rootNode)
overridevirtual

Basic exporting capabilities.

Parameters
rootNodeThe tree to export to.

Reimplemented from nkGraphics::Pass.

◆ importClassFromTree()

virtual void nkGraphics::RaytracingPass::importClassFromTree ( nkExport::Node rootNode)
overridevirtual

Basic importing capabilities.

Parameters
rootNodeThe tree to import from.

Reimplemented from nkGraphics::Pass.


The documentation for this class was generated from the following file: