2020-08-11 12:07:21 -04:00
# Prism
2022-02-21 00:25:44 -05:00
A cross-platform engine providing real-time physically based rendering. This is the culmination
of several years of my own graphics programming work :-)
2020-08-11 12:07:21 -04:00
2022-02-21 00:25:44 -05:00
Here is a selection of screenshots that provides a good sense of the graphical capabilities of Prism:
2020-08-11 12:07:21 -04:00
2022-05-21 16:32:28 -04:00


2020-08-11 12:41:19 -04:00
2022-05-21 16:32:28 -04:00


2020-08-11 12:41:19 -04:00
2021-02-04 10:06:57 -05:00
The sibenik, sponza and buddha models shown are from the [McGuire Computer Graphics Archive ](https://casual-effects.com/data/ ), any other models shown are created by me.
2020-08-11 12:07:21 -04:00
## Features
2022-05-21 16:44:07 -04:00
* Custom cross-platform high-level graphics API
2022-05-21 16:32:28 -04:00
* Backends available:
* Vulkan
* Metal
* DX12
* Rendering is consistent regardless of platform or API used!
2022-05-21 16:44:07 -04:00
* 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.
2022-05-21 16:32:28 -04:00
* 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.
2022-05-21 16:44:07 -04:00
* Support for querying whether the platform is in light/dark mode (where supported). Currently, this only switches between the light/dark imgui themes.
2022-05-21 16:32:28 -04:00
* 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.
2022-05-21 16:44:07 -04:00
* Custom ImGui backend is built on top the GFX api and other platform-agnostic systems.
2022-06-23 14:02:51 -04:00
* Plenty of custom widgets available for easily creating debug tools, see [imgui_stdlib.h ](item/extern/imgui/include/imgui_stdlib.h ) and [imgui_utility.hpp ](item/engine/core/include/imgui_utility.hpp )!
2022-05-21 16:32:28 -04:00
* Entity-Component system for modular object building
2022-06-23 14:02:51 -04:00
* No runtime polymorphism is involved, and it leverages the native C++ type system, [components are kept as simple structs ](item/engine/core/include/components.hpp ).
2022-05-21 16:32:28 -04:00
* Asset management
2022-05-21 16:44:07 -04:00
* Custom model file format for super-fast model loading and small file sizes.
2022-05-21 16:32:28 -04:00
* 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
2022-05-21 16:44:07 -04:00
* Multi-document workflow similar to UE4.
2022-05-21 16:32:28 -04:00
* Undo/redo system.
* Transform handles for easy object manipulation.
2020-08-11 12:07:21 -04:00
2022-02-21 00:25:44 -05:00
## Building
2022-05-21 16:32:28 -04:00
2022-05-21 16:44:07 -04:00
Prism will build out of the box in CMake, but on some platforms (like Windows) you will have to point to some
2022-05-21 16:32:28 -04:00
dependencies yourself.
2020-08-11 12:07:21 -04:00
2022-02-28 21:32:02 -05:00
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.
2022-03-06 19:16:20 -05:00
2022-05-21 16:32:28 -04:00
### 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,
2022-08-15 10:07:19 -04:00
use Clang and your build times should improve dramatically.
2022-05-21 16:32:28 -04:00
2022-03-06 19:16:20 -05:00
## Usage
The ideal way to use it is by letting prism take over your main() and implementing an app_main() instead,
2022-03-22 10:13:25 -04:00
(and using `add_platform_executable` in CMake) but I'm working on letting developers use the engine as a regular library too.