~redstrate/prism

3D game engine focusing on real-time graphics
a month ago

Austin Bricker via public-inbox

a month ago

#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 (WIP)
    • Rendering is consistent regardless of platform or API used!
      • Where older GPUs are supported (like the ones used in 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, where needed.
  • 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 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 superfast 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 the example folder. 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 being able to use the engine as a regular library.