3D extension library for Raylib. Adding loads of additional features and capabilities to raylib, including multiple render pipelines, and lighting features, as well as effectively wrapping the functions of raylib into a namespace ( a prefix R3D_* )

#3d #gamedev #raylib #library #rendering #game-engine #game-dev #2d #framework #c #glsl #opengl

Le Juez Victor 0492298e5d Merge pull request #197 from grunthon/shadow-functions 2 zile în urmă
.github 6bda1a6cc6 (workflow) remove `BUILD_DIR` 1 săptămână în urmă
assets 2d3b4337a1 update brdf lut 1 lună în urmă
cmake 75678c91e8 update mingw instructions 2 săptămâni în urmă
docs d57dec3773 remove redundant example 1 săptămână în urmă
examples 51e3949a37 oops; revert 'instanced' example 5 zile în urmă
external 3dbe255848 stick to raylib 5.5 2 săptămâni în urmă
include 97c06fde83 materials loading functions 5 zile în urmă
scripts a0eaa6c0fb new year... 2 săptămâni în urmă
shaders ecfa97b918 review shadow sampling rotation 2 zile în urmă
src 2e0caacd87 include header for visibility functions 3 zile în urmă
.gitattributes 047917dbb1 Ajouter .gitattributes et .gitignore 1 an în urmă
.gitignore 3f737a4302 update gitignore 10 luni în urmă
.gitmodules 119c002535 re-add assimp submodule 7 luni în urmă
CMakeLists.txt 364af36246 rename r3d_draw module to r3d_render 6 zile în urmă
CMakePresets.json 5ba5af3f58 update CMakePresets.json 7 luni în urmă
Doxyfile.in 9133a09b86 doxygen generation 6 luni în urmă
LICENSE a0eaa6c0fb new year... 2 săptămâni în urmă
README.md cf9b673cc8 update readme 6 zile în urmă
ROADMAP.md 5fbc16e008 update roadmap 5 zile în urmă
logo.png 428f05940e readme 1 an în urmă

README.md

R3D – 3D Extension Library for raylib


R3D is an extension library for raylib that expands its 3D capabilities, including rendering, lighting, kinematics, mesh utilities, and related helpers, without turning raylib into a full engine.


GitHub Releases Downloads GitHub Stars License CI

[!WARNING] It is recommended to use the pre-release tags. While you can use the master branch, unexpected API breaking changes may occur until the first official release is published.


Key Features

  • Hybrid Renderer: Deferred pipeline with forward rendering for transparency.
  • Advanced Materials: Complete PBR material system (Burley/SchlickGGX)
  • Custom Shaders: Support for surface shaders (materials/decals) and screen shaders.
  • Dynamic Lighting: Directional, spot, and omni lights with soft shadows
  • Image-Based Lighting: Supports environment IBL and reflection probes.
  • Post-Processing: SSAO, SSR, DoF, bloom, fog, tonemapping, and more
  • Kinematics Support: Basic kinematic system with capsule and mesh-based colliders.
  • Mesh Utilities: Mesh generation, manipulation, and helper utilities.
  • Model Loading: Assimp integration with animations and mesh generation
  • Performance: Built-in frustum culling, instanced rendering, and more

Requirements

To build R3D, you must have:

  • raylib 5.5+ (optionally provided as a submodule)
  • Assimp 6.0.2+ (optionally provided as a submodule)
  • Python 3.6+ (used to process shaders during compilation)

To use R3D, the required specifications are:

  • OpenGL 3.3+ (with support for GL_ARB_texture_cube_map_array)

Bindings

Here is a list with all the ports available. Feel free to send a PR if you know of any binding/wrapper not in this list.

Name R3D Version Language License
r3d-odin 0.8 Odin Zlib
ray4laz_r3d 0.8 FreePascal MIT
r3d-cs 0.8 C# Zlib

Installation

If you don't know how to start and want to try it quickly:

git clone --depth 1 --recurse-submodules https://github.com/Bigfoot71/r3d
cd r3d
mkdir build && cd build
cmake .. -DR3D_RAYLIB_VENDORED=ON -DR3D_ASSIMP_VENDORED=ON
cmake --build .

Or you can use r3dStarter made by Jens Roth.

Quick Start

#include <r3d/r3d.h>
#include <raymath.h>

int main(void)
{
    InitWindow(800, 600, "R3D Example");
    SetTargetFPS(60);

    R3D_Init(800, 600);

    // Create scene objects
    R3D_Mesh mesh = R3D_GenMeshSphere(1.0f, 16, 32);
    R3D_Material material = R3D_GetDefaultMaterial();

    // Setup lighting
    R3D_Light light = R3D_CreateLight(R3D_LIGHT_DIR);
    R3D_SetLightDirection(light, (Vector3){-1, -1, -1});
    R3D_SetLightActive(light, true);

    // Camera setup
    Camera3D camera = {
        .position = {3, 3, 3},
        .target = {0, 0, 0},
        .up = {0, 1, 0},
        .fovy = 60.0f,
        .projection = CAMERA_PERSPECTIVE
    };

    // Main loop
    while (!WindowShouldClose()) {
        UpdateCamera(&camera, CAMERA_ORBITAL);
        BeginDrawing();
        R3D_Begin(camera);
        R3D_DrawMesh(mesh, material, Vector3Zero(), 1.0f);
        R3D_End();
        EndDrawing();
    }

    R3D_UnloadMesh(mesh);
    R3D_Close();
    CloseWindow();
    return 0;
}

License

Licensed under the Zlib License - see LICENSE for details.

Screenshots