载入中...
搜索中...
未找到
eve::graphics::IRayTracing类 参考abstract

Optional hardware ray-tracing backend (Vulkan KHR RT). 更多...

#include <IRayTracing.h>

类 eve::graphics::IRayTracing 继承关系图:
eve::graphics::raytracing::VulkanRayTracing

Public 成员函数

virtual ~IRayTracing ()=default
 I ray tracing.
 
virtual bool isAvailable () const =0
 True when the active Graphics device enabled the KHR RT path.
 
virtual RayTracingCaps caps () const =0
 Borrowed device caps; valid while Graphics remains initialized.
 
virtual Result< void > applyReflections (Graphics *gfx, Texture *sceneColor, Texture *hwDepth, Texture *worldNormal, Canvas *dest, const glm::mat4 &invViewProj, const glm::mat4 &viewProj, const glm::vec3 &eyeWorld)=0
 Trace mirror-style reflections into dest (RGBA16F, A = hit mask).
 
virtual Result< void > rebuildScene ()=0
 Rebuild the TLAS from meshes previously registered with the scene.
 
virtual Result< uint32_t > addTriangleMesh (const float *positionsXYZ, int vertexCount, const uint32_t *indices, int indexCount, const glm::mat4 &transform)=0
 Register a triangle mesh instance for ray tracing.
 
virtual Result< uint32_t > addMesh (Mesh *mesh, const glm::mat4 &transform)=0
 Register a GPU Mesh already uploaded by Graphics. @ownership mesh is borrowed for the call; vertex/index bytes are copied. @lifetime mesh and its gpuHandle must remain valid through this call.
 
virtual void clearScene ()=0
 Drop every registered mesh and acceleration structure.
 
virtual void detachFromGraphics ()
 Release device-owned RT resources before Graphics destroys the device. @thread Render thread only; safe when never attached.
 

静态 Public 属性

static constexpr const char * capabilityName = "IRayTracing"
 

详细描述

Optional hardware ray-tracing backend (Vulkan KHR RT).

Provided by the graphics_raytracing module when linked. Consumers must tolerate eve::cap::query<IRayTracing>() == nullptr (module trimmed) and isAvailable() == false (GPU lacks the extensions) as supported states.

@lifetime The provider is registered at static init and outlives modules. @thread Render thread only.

在文件 IRayTracing.h 第 26 行定义.

构造及析构函数说明

◆ ~IRayTracing()

virtual eve::graphics::IRayTracing::~IRayTracing ( )
virtualdefault

I ray tracing.

成员函数说明

◆ addMesh()

virtual Result< uint32_t > eve::graphics::IRayTracing::addMesh ( Mesh *  mesh,
const glm::mat4 &  transform 
)
pure virtual

Register a GPU Mesh already uploaded by Graphics. @ownership mesh is borrowed for the call; vertex/index bytes are copied. @lifetime mesh and its gpuHandle must remain valid through this call.

在 eve::graphics::raytracing::VulkanRayTracing 内被实现.

◆ addTriangleMesh()

virtual Result< uint32_t > eve::graphics::IRayTracing::addTriangleMesh ( const float *  positionsXYZ,
int  vertexCount,
const uint32_t *  indices,
int  indexCount,
const glm::mat4 &  transform 
)
pure virtual

Register a triangle mesh instance for ray tracing.

参数
positionsXYZPacked xyz positions (vertexCount * 3).
indicesTriangle indices (indexCount, multiple of 3).
transformObject-to-world transform for the TLAS instance.
返回
Instance id on success, or Unsupported / InvalidArgument. @ownership Input spans are borrowed only during this call.

在 eve::graphics::raytracing::VulkanRayTracing 内被实现.

◆ applyReflections()

virtual Result< void > eve::graphics::IRayTracing::applyReflections ( Graphics *  gfx,
Texture *  sceneColor,
Texture *  hwDepth,
Texture *  worldNormal,
Canvas *  dest,
const glm::mat4 &  invViewProj,
const glm::mat4 &  viewProj,
const glm::vec3 &  eyeWorld 
)
pure virtual

Trace mirror-style reflections into dest (RGBA16F, A = hit mask).

参数
gfxActive Graphics backend (Vulkan).
sceneColorLit scene color to sample on a hit when no material is bound.
hwDepthHardware depth (D32) matching the scene projection.
worldNormalWorld-space normals (RGB).
destOutput canvas; size drives the launch dimensions.
invViewProjInverse view-projection (RH + ZO) for primary rays.
viewProjView-projection used to reproject hit points into scene color.
eyeWorldCamera eye in world space.
返回
Unsupported when RT is unavailable; NoOp when the TLAS is empty; Failed on GPU errors. Callers must treat NoOp as "no usable output". @ownership All pointers are borrowed for the call; none are retained.

在 eve::graphics::raytracing::VulkanRayTracing 内被实现.

◆ caps()

virtual RayTracingCaps eve::graphics::IRayTracing::caps ( ) const
pure virtual

Borrowed device caps; valid while Graphics remains initialized.

在 eve::graphics::raytracing::VulkanRayTracing 内被实现.

◆ clearScene()

virtual void eve::graphics::IRayTracing::clearScene ( )
pure virtual

Drop every registered mesh and acceleration structure.

在 eve::graphics::raytracing::VulkanRayTracing 内被实现.

◆ detachFromGraphics()

virtual void eve::graphics::IRayTracing::detachFromGraphics ( )
inlinevirtual

Release device-owned RT resources before Graphics destroys the device. @thread Render thread only; safe when never attached.

被 eve::graphics::raytracing::VulkanRayTracing 重载.

在文件 IRayTracing.h 第 90 行定义.

◆ isAvailable()

virtual bool eve::graphics::IRayTracing::isAvailable ( ) const
pure virtual

True when the active Graphics device enabled the KHR RT path.

在 eve::graphics::raytracing::VulkanRayTracing 内被实现.

◆ rebuildScene()

virtual Result< void > eve::graphics::IRayTracing::rebuildScene ( )
pure virtual

Rebuild the TLAS from meshes previously registered with the scene.

返回
Unsupported when RT is unavailable; Failed on build errors.

在 eve::graphics::raytracing::VulkanRayTracing 内被实现.

类成员变量说明

◆ capabilityName

constexpr const char* eve::graphics::IRayTracing::capabilityName = "IRayTracing"
staticconstexpr

在文件 IRayTracing.h 第 28 行定义.


该类的文档由以下文件生成: