Convert Figma logo to code with AI

GPUOpen-LibrariesAndSDKs logoRadeonRays_SDK

Radeon Rays is ray intersection acceleration library for hardware and software multiplatforms using CPU and GPU

1,070
192
1,070
60

Top Related Projects

One stop solution for all Vulkan samples

7,123

glTF – Runtime 3D Asset Delivery

Quick Overview

The Radeon Rays SDK is an open-source ray tracing library developed by AMD. It provides a high-performance, cross-platform API for ray tracing, enabling developers to integrate ray tracing capabilities into their applications. The library supports a variety of rendering techniques, including path tracing, photon mapping, and more.

Pros

  • High Performance: The Radeon Rays SDK is designed for high-performance ray tracing, leveraging the power of modern GPUs to accelerate the rendering process.
  • Cross-Platform: The library is cross-platform, supporting Windows, Linux, and macOS, making it accessible to a wide range of developers.
  • Flexible API: The Radeon Rays SDK offers a flexible API that allows developers to customize and integrate ray tracing functionality into their applications.
  • Active Development: The project is actively maintained and developed by AMD, with regular updates and improvements.

Cons

  • Limited Documentation: The project's documentation could be more comprehensive, which may make it challenging for new users to get started.
  • Steep Learning Curve: Integrating ray tracing into an application can be a complex task, and the Radeon Rays SDK may have a steeper learning curve compared to some other rendering libraries.
  • Dependency on AMD Hardware: While the library is cross-platform, it may be more optimized for AMD hardware, which could be a limitation for developers using other GPU vendors.
  • Limited Community Support: The Radeon Rays SDK may not have as large of a community as some other open-source projects, which could make it more difficult to find support and resources.

Code Examples

Here are a few code examples demonstrating the usage of the Radeon Rays SDK:

  1. Creating a Ray Tracing Context:
// Create a ray tracing context
rr::Context* context = rr::Context::Create();
  1. Intersecting a Ray with a Mesh:
// Create a mesh
rr::Mesh* mesh = context->CreateMesh(vertices, numVertices, indices, numIndices);

// Create a ray
rr::Ray ray;
ray.origin = glm::vec3(0.0f, 0.0f, 0.0f);
ray.direction = glm::vec3(1.0f, 0.0f, 0.0f);

// Intersect the ray with the mesh
rr::Intersection intersection;
if (mesh->Intersect(ray, &intersection)) {
    // Handle the intersection
    std::cout << "Intersection point: " << intersection.hit_point << std::endl;
}
  1. Rendering a Scene with Path Tracing:
// Create a scene
rr::Scene* scene = context->CreateScene();
scene->AttachShape(mesh);

// Create a camera
rr::Camera* camera = context->CreateCamera();
camera->LookAt(glm::vec3(0.0f, 0.0f, 2.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f));

// Render the scene using path tracing
rr::FrameBuffer* frameBuffer = context->CreateFrameBuffer(width, height, rr::FrameBufferFormat::RGBA_32F);
context->Render(scene, camera, frameBuffer, rr::RenderMode::PATHTRACING);

Getting Started

To get started with the Radeon Rays SDK, follow these steps:

  1. Clone the GitHub repository:
git clone https://github.com/GPUOpen-LibrariesAndSDKs/RadeonRays_SDK.git
  1. Navigate to the project directory:
cd RadeonRays_SDK
  1. Build the project using your preferred build system (e.g., CMake, Visual Studio, etc.).

  2. Include the Radeon Rays SDK in your project and start using the API to integrate ray tracing functionality into your application.

For more detailed instructions, please refer to the project's [README](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonRays_

Competitor Comparisons

One stop solution for all Vulkan samples

Pros of Vulkan-Samples

  • Provides a wide range of sample applications that demonstrate the usage of the Vulkan API, covering various features and use cases.
  • Includes detailed documentation and explanations for each sample, making it easier for developers to understand and learn Vulkan.
  • Supports multiple platforms, including Windows, Linux, and macOS, allowing developers to test and run the samples on different systems.

Cons of Vulkan-Samples

  • The repository is primarily focused on Vulkan, while RadeonRays_SDK covers a broader range of GPU-accelerated technologies, including ray tracing.
  • The samples may not be as visually impressive or feature-rich as the demos provided in RadeonRays_SDK.
  • The repository may not receive as frequent updates and improvements as the RadeonRays_SDK, which is actively maintained by AMD.

Code Comparison

Here's a brief comparison of the code structure between the two repositories:

RadeonRays_SDK

class RenderFactory {
public:
    virtual Renderer* CreateRenderer() = 0;
    virtual Scene* CreateScene() = 0;
    virtual Camera* CreateCamera() = 0;
    virtual Light* CreateLight(LightType type) = 0;
    virtual Shape* CreateShape(ShapeType type) = 0;
    virtual Material* CreateMaterial(MaterialType type) = 0;
    virtual Texture* CreateTexture(const char* path) = 0;
};

Vulkan-Samples

class VulkanSample {
public:
    virtual void prepare(VkDevice device, VkPhysicalDevice physicalDevice) = 0;
    virtual void render(VkCommandBuffer cmdBuffer) = 0;
    virtual void resize(uint32_t width, uint32_t height) = 0;
    virtual void cleanup(VkDevice device) = 0;
    virtual void keyPressed(uint32_t keyCode) = 0;
    virtual void mouseMoved(double x, double y) = 0;
};

The code snippets show the differences in the class structures and the methods provided by the two repositories. RadeonRays_SDK focuses on creating and managing various GPU-accelerated components, while Vulkan-Samples provides a more generic interface for preparing, rendering, and cleaning up Vulkan-based samples.

7,123

glTF – Runtime 3D Asset Delivery

Pros of glTF

  • Widely adopted and supported by a large ecosystem of tools and libraries
  • Provides a standardized way to represent 3D assets, making it easier to share and exchange data
  • Supports a wide range of features, including materials, animations, and extensions

Cons of glTF

  • Complexity of the specification can make it challenging to implement and work with
  • Limited support for real-time rendering features, such as ray tracing or physically-based rendering
  • Potential performance overhead due to the need to parse and process the file format

Code Comparison

RadeonRays_SDK

// Create a context
auto context = RadeonRays::Context::Create();

// Create a scene
auto scene = RadeonRays::Scene::Create(context);

// Add a mesh to the scene
auto mesh = RadeonRays::Mesh::Create(context, vertices, num_vertices, indices, num_indices);
scene->AttachShape(mesh);

glTF

{
  "asset": {
    "version": "2.0"
  },
  "scenes": [
    {
      "nodes": [0]
    }
  ],
  "nodes": [
    {
      "mesh": 0
    }
  ],
  "meshes": [
    {
      "primitives": [
        {
          "attributes": {
            "POSITION": 0,
            "NORMAL": 1
          },
          "indices": 2
        }
      ]
    }
  ]
}

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

RadeonRays 4.1

Summary

RadeonRays is a ray intersection acceleration library. AMD developed RadeonRays to help developers make the most of GPU and to eliminate the need to maintain hardware-dependent code.

The library offers a well-defined C API for scene building and performing asynchronous ray intersection queries.

RadeonRays is not limited to AMD hardware, a specific operating system or graphics framework. The library helps assure compatibility and best performance across a wide range of hardware platforms.

Backends

The library supports the following graphics and GPGPU frameworks as its backends:

  • DirectX12
  • Vulkan

System Requirements

RadeonRays requires a PC with the following software and hardware:

  • DirectX12: a 64-bit version of Windows® 10, and a GPU and drivers that supports DirectX12 features
  • Vulkan: a 64-bit version of Windows® 10 or Linux, and a GPU and drivers that support Vulkan version 1.2
  • Installed spdlog library

Documentation

Documentation page