Josh3d (pronounced as "joe shed") is a small 3D rendering engine written in OpenGL 4.3 and C++20.
It's mainly a hobby project and is a constant work in progress so there's no stable version. The scope is limited by my abilities and the free time that I have, but I do try to keep everything clean and even write comments sometimes, so you're welcome to poke around in code if you want. It also serves as the prototyping grounds for trying different techniques, thanks to the extendable and hook-able architecture the engine has.
Here's some pictures because you probably like to look at things:
Tree asset by SomeKevin on sketchfab, Forest Skybox by Emil Persson, Sponza by Frank Meinl, Josh by me.
- Deferred renderer with Blinn-Phong shading;
- Directional and point lights with shadow mapping;
- Normal maps;
- Soft gaussian bloom;
- Barometric and uniform fog;
- Gamma Correction and HDR with adaptive exposure.
- ECS based engine design written to accomodate minimal shader switching and minimize "late-bound" decision making;
- Support for adding custom rendering and postprocessing passes to the engine. Nothing is "nailed-down", everything can be extended or replaced by a user-provided solution;
- ImGui hooks for configuring rendering passes and manipulating registry components.
(items in each section are listed in order of priority)
- Cascaded shadow mapping;
- SSAO;
- PBR support;
- Some global illumination solution;
- More grass, I like grass.
- Support for precompute passes;
- Frustrum culling;
- Compute-based particle system;
- Instancing, indirect draws and tricks to scale up to larger scenes.
- Asynchronous asset loading with caching;
- High-level asset management system;
- Serialization (binary ECS dump + custom schema)
- Package the project so that it could be used as a dependency through FetchContent or similar.
Requires: C++20 Compiler, CMake 3.21, vcpkg
Depends on: glbinding, glfw, glfwpp, glm, assimp, stb, range-v3, entt, dear imgui, doctest
All dependencies are satisfied automatically with vcpkg or FetchContent.
Configure and build from the project root:
VCPKG_ROOT=[path to vcpkg]
CMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake
mkdir build
cmake -S . -B build
cmake --build build
Run the demo and tests from the project root.
Josh is a slimy, leopard colored, striped tree that I made in 15 minutes in blender when I needed an asset to test normal maps. I was so proud of myself at the time, that I decided to dedicate this whole repo (and years of my work) to it.
Here's a pic of Josh taking a nap:
Isn't it cute?