Archived
1
Fork 0
3D game engine focusing on real-time graphics
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2022-08-15 10:54:14 -04:00
.github/workflows Final attempt to appease MSVC 2022-03-07 09:49:31 -05:00
addon Add initial files 2020-08-11 12:07:21 -04:00
cmake Add asset pipelines a base dependency for now 2022-06-27 10:07:16 -04:00
engine Fix stupid formatting warning, again 2022-08-15 10:17:31 -04:00
example Choose 0.1 as a new reasonable default for camera near plane 2022-08-15 10:13:45 -04:00
extern Give up and pull glslang from master 2022-04-04 07:58:35 -04:00
misc Update PCSS and Sponza screenshots 2020-08-19 22:33:35 -04:00
platforms Fix up macOS SDL backend to accodomate the new engine base data 2022-06-27 10:09:07 -04:00
tools Fix compilation errors in cutscene editor 2022-08-15 10:25:29 -04:00
.clang-format Add a .clang-format 2022-02-20 23:28:06 -05:00
.editorconfig Update .clang-format, add .editorconfig 2022-08-15 10:54:14 -04:00
.gitignore Add KDE directory files to gitignore 2022-03-06 19:17:56 -05:00
CMakeLists.txt Goodbye, WebGPU 2022-03-10 10:26:59 -05:00
LICENSE Update license year 2022-02-28 21:31:14 -05:00
README.md Fix typo, using Clang will not dramatically increase build times 2022-08-15 10:07:19 -04:00

Prism

A cross-platform engine providing real-time physically based rendering. This is the culmination of several years of my own graphics programming work :-)

Here is a selection of screenshots that provides a good sense of the graphical capabilities of Prism:

pcss sponza

buddha custom models

The sibenik, sponza and buddha models shown are from the McGuire Computer Graphics Archive, any other models shown are created by me.

Features

  • Custom cross-platform high-level graphics API
    • Backends available:
      • Vulkan
      • Metal
      • DX12
    • Rendering is consistent regardless of platform or API used!
      • Where older GPUs are supported (for example, an Apple TV 4K, or a Thinkpad X230), the engine supports disabling expensive features like IBL or point light shadows and has other scalability options.
    • Shaders are written in GLSL, and compiled to the required shader language offline and/or at runtime using SPIRV-Cross and glslang.
  • Other advanced rendering techniques
    • Real-time physically based rendering including using scene probes for image-based lighting.
    • Skinned mesh support with animation.
    • PCSS or PCF for softer shadows, supported on every type of light.
    • Automatic eye adaption with exposure using compute kernels.
  • Custom window management API
    • main() and other platform-specific tidbits are abstracted, for easy support of non-desktop platforms like mobile devices.
    • HiDPI support included and enabled by default!
    • If available on the platform, multiple windows are supported as well! This is leveraged by Dear ImGui for multiple viewport support.
    • Support for querying whether the platform is in light/dark mode (where supported). Currently, this only switches between the light/dark imgui themes.
  • Dear ImGui used for debug/editor UIs
    • Uses the experimental docking/viewport branch!
    • Automatic DPI scaling on fonts for crisp rendering when the window is in a HiDPI environment.
    • Custom ImGui backend is built on top the GFX api and other platform-agnostic systems.
    • Plenty of custom widgets available for easily creating debug tools, see imgui_stdlib.h and imgui_utility.hpp!
  • Entity-Component system for modular object building
  • Asset management
    • Custom model file format for super-fast model loading and small file sizes.
      • Includes a custom Blender addon for easy exporting!
    • Assets are referenced from disk, and only loaded once - and are unloaded once they are no longer referenced.
    • Thumbnails are created automatically by the editor and stored on disk until further use.
  • Custom math library
    • Quaternions, matrices, vectors, rays, and more are available!
    • Infinite perspective matrices are available and used by default.
  • Custom editors supporting scene, cutscene, material authoring
    • Multi-document workflow similar to UE4.
    • Undo/redo system.
    • Transform handles for easy object manipulation.

Building

Prism will build out of the box in CMake, but on some platforms (like Windows) you will have to point to some dependencies yourself.

There is an example app provided in example/. If you want to build the tooling or the example, use the CMake options BUILD_EXAMPLE and BUILD_TOOLS respectively.

Combating slow compile times/linking times

Unfortunately Prism is built upon tons of statically linked libraries, and GCC's linker is notoriously slow for this task. If possible, use Clang and your build times should improve dramatically.

Usage

The ideal way to use it is by letting prism take over your main() and implementing an app_main() instead, (and using add_platform_executable in CMake) but I'm working on letting developers use the engine as a regular library too.