The Forge is a cross-platform rendering framework supporting
- PC
- Windows 10
- with DirectX 12 / Vulkan 1.1
- with DirectX Ray Tracing API
- DirectX 11 Fallback Layer for Windows 7 support (not extensively tested)
- Linux Ubuntu 18.04 LTS with Vulkan 1.1
- Windows 10
- Android Pie with Vulkan 1.1
- macOS with Metal 2
- iOS with Metal 2
- XBOX One / XBOX One X (only available for accredited developers on request)
- PS4 (in development) (only available for accredited developers on request)
Particularly, the graphics layer of The Forge supports cross-platform
- Descriptor management
- Multi-threaded and asynchronous resource loading
- Shader reflection
- Multi-threaded command buffer generation
The Forge can be used to provide the rendering layer for custom next-gen game engines. It is also meant to provide building blocks to write your own game engine. It is like a "lego" set that allows you to use pieces to build a game engine quickly. The "lego" High-Level Features supported on all platforms are at the moment:
- Asynchronous Resource loading with a resource loader task system as shown in 10_PixelProjectedReflections
- Lua Scripting System - currently used in 06_Playground to load models and textures and animate the camera
- Animation System based on Ozz Animation System
- Consistent Math Library based on an extended version of Vectormath
- Extended version of TinySTL
- For loading art assets we have a modified and integrated version of Assimp
- Consistent Memory Managament: on GPU following Vulkan Memory Allocator
- Input system with Gestures for Touch devices based on an extended version of gainput
- Very fast Entity Component System based on ENTT
- UI system based on imGui with a dedicated unit test extended for touch input devices
- Various implementations of high-end Graphics Effects as shown in the unit tests below
Please find a link and credits for all open-source packages used at the end of this readme.
Future plans are
- Unified shader generation -> check out an alpha version of the Confetti Shader Translator. This shader translator is build with the purpose of supporting a higher-level shading language, which we call super HLSL or short sHLSL
Join the channel at https://twitter.com/TheForge_FX?lang=en
-
The purpose of the DescriptorBinder approach is to allocate all memory descriptor space at load time, instead of doing it on-demand at runtime, as it is commonly done. This is done in an effort to allow applications to have better control over memory footprint overhead, which is especially important on mobile targets, and to improve performance by avoiding runtime memory allocations. The system will use shader reflection to determine the appropriate descriptor layouts in combination with descriptor update frequency knowledge. This knowledge will come from the client domain or from content editor tools. With this information, we are able to allocate all necessary descriptor memory up-front, giving more control to the application about the memory footprint. This is one of the initiatives leading up to the new version of The Forge. Read more Descriptor Management
-
The input system was refactored and streamlined. This is mostly a rewrite of the code layer above gainput.
- IOperatingSystem.h: getMousePosition, getKeyDown, getKeyUp, getJoystickButtonDown, getJoystickButtonUp were removed
- InputSystem.h:
- KeyMappingDescription - changed now every axis should be defined as separate entry
- IsButtonPressed, IsButtonTriggered, IsButtonReleased, MapKey, SetActiveInputMap, GetButtonData, GetDisplayWidth, GetDisplayHeight, were removed
- New functions GetBoolInput, GetFloatInput. KeyMappingDescription for new function require directly specifying intended action(released, pressed, triggered) via DEFINE_DEVICE_ACTION macro
- For InputEventHandler old style definition is used
- The Forge now allows to asynchronously load resources on all platforms. There are two ways to do this:
- use addResource/updateResource with boolean parameter called batch set to true, and later wait for completion with waitBatchCompleted (used in 01_Transformations, 03_MultiThread, 06_MaterialPlayground, 09_LightShadowPlayground, 09a_HybridRaytracing, 12_RendererRumtimeSwitch, 15_Transparency)
- use addResource with SyncToken parameter and check for completion with isTokenCompleted or wait for completion with waitTokenCompleted (used in 10_PixelProjectedReflections) addResource/updateResource with boolean parameter set to false are the old blocking versions. Let us know what you think of this system.
- We integrated zeux's Micro Profiler into The Forge. So far it supports DirectX 11, 12 and Vulkan. We are still working on Metal and Android support.
Visibility Buffer on PC Windows 10
- Better integration of Ray Tracing into the renderer; still Vulkan RTX is work in progress
- Fixed Vulkan instance extension bug: "InstanceLayers loop is wrong in CreateInstance" issue #92
Happy Valentines! Here is some love from The Forge team:
- new cross-platform Ray Tracing interface in IRay.h, currently supporting DXR (Vulkan comes next) and Metal Ray Tracing on Windows, macOS and iOS. In other words you can now write Ray Tracing code that runs on Windows, macOS and iOS. You will need a RTX GPU to run this on Windows. On macOS / iOS only latest software update is needed.
PC Windows 10 RS5, DirectX12, GeForce RTX 2070, Driver version 418.81 with resolution 3440x1440:
Mac Mini with Intel Core i5 3GHz cpu with integrated graphics Intel UHD Graphics 630 (Part No. MRTT2RU/A) with resolution 3440x1440:
iPad 6th Generation iOS 12.1.3 (16D39) with a resolution of 2048x1536
- Rewrote the Light & Shadow Playground from scratch, thanks to Mateusz Kielan:
iMac with AMD RADEON 580 (Part No. MNED2xxA) with resolution of 5120x2880:
iPhone 7 iOS 12.1.4 (16D57) with a resolution of 1334x750:
Linux Ubuntu 18.04.1 LTS Vulkan 1.1.92 RADEON 480 Driver 18.30 with a resolution of 1920x1080:
-
macOS / iOS:
- upgraded to
- macOS Mojave 10.14.4 beta (18E174f)
- iOS 12.2 beta (16E5181f)
- Xcode 10.2 beta (10P82s)
- a few months ago, we submitted a bug report for wave intrinsics to Apple and with the latest firmware beta (see above), wave intrinsics are working now in unit test 15
- support PVR texture compression (V3 header) on iOS
- upgraded to
-
Improvements for all Platforms:
- 3D Texture mip maps for write
- Unified texture subresource updates across all APIs
- Memory optimizations: much less memory is used across all platforms
-
All the unit tests are now in one folder unit test and they are in one solution file
This is the first release in 2019 and The Forge GitHub repository is today exactly one year old, with the first release on the same day last year :-) In 2018 we made 22 releases and we improved The Forge in many areas. If you followed us so far ... why not just join us? We are looking for more graphics programmers joining our teams. We have offices in Encinitas, CA USA (Main) / Mumbai, India / Shanghai, China / Breda, Netherlands / St. Petersburg, Russia and in Lviv, Ukraine.
Now back to release notes: many years ago in 2012 / 2013, we helped AMD and Crystal Dynamics with the development of TressFX for Tomb Raider. We also wrote an article about the implementation in GPU Pro 5 and gave a few joint presentations on conferences like FMX. At the end of last year we revisited TressFX. We took the current code in the GitHub repository, changed it a bit and ported it to The Forge. It now runs on PC with DirectX 12 / Vulkan, Linux with Vulkan, macOS and iOS with Metal 2 and on the XBOX One. We also created a few new hair assets so that we can showcase it. Here are screenshots of our programmers art:
PC Windows DirectX 12 GTX 950 Driver 416.81:
iPad (Model A1803):
The current implementation is overall too slow to be used on some of our platforms but we are going to improve performance over time. We are also going to improve the hair art assets. Apart from Hair, the Material Playground now also has improved versions of Metal and a new material category Wood:
Metal:
Wood:
- New Entity component system (ECS) for all platforms: we've chosen to integrate ENTT (https://github.com/skypjack/entt) into The Forge. The initial implementation was contributed by Amer Koleci @AmerKoleci:
- Lua Scripting System for all platforms: the Lua scripting integration allows to register functions to lua contexts so these functions will be available via scripts. Functions can be static or lambda. In latter case you can store some state information within lambda. Scripts are executed using LuaManager::RunScript() or LuaManager::AddAsyncScript() methods. In second case scripts are still executed in synchronous way. Async execution implementation is planned. Also there is "updateable" script. It is loaded (at this point script main body is executed), then it can be "updated" - update() function from script is invoked. Script can invoke any registered function and can store state information which will be available from update to update. The script can be reloaded - can be useful for fast iterations when you just modify script and don't even need to restart application. If that script contains exit() function then it will be executed when script is reloaded or closed. Checkout unit test 06_MaterialPlayground for an example on how to use it. In this unit tests it executes three scripts to load models and textures and animate the camera.
Release 1.21 - December 1st, 2018 - Season Greetings with new Skinning Unit Test | Unified Vulkan Shaders
The team will soon go into winter hybernation mode ... which means many Confetti people will fly home over the holiday season to spend time with their loved ones. We will be back with more releases next year, probably in February.
To send you season greetings, we extended our Ozz implementation by adding a new Skinning unit test:
PC Windows 10 DirectX 12 GeForce 950 Driver 411.63 with a resolution of 1080p
Linux Ubuntu 18.04.1 LTS Vulkan 1.1.92 RADEON 480 Driver 18.30 with a resolution of 1920x1080
iMac with AMD RADEON 580 (Part No. MNED2xx/A) with resolution of 1920x1080
iPhone 7 iOS 12.0.1 (16A404) with a resolution of 1334x750
- Vulkan:
- all three Vulkan platforms (Windows, Linux, Android) use now the same Vulkan shaders
- Upgraded Linux and Windows SDK to 1.1.92.1
- The math library now supports more integer data types
- Updated assimp to use latest master + added projects instead of shipping binaries
- macOS / iOS
- Added support for iOS Gestures (Not currently in use in the unit-tests)
- Improved pixel projected reflections on Metal Platforms
- Upgraded all the XCode projects to target Xcode 10.1 (10B61) and iOS Version 12.0.1 (16A404)
- Started Testing additionally on A12 Devices Phone Xs Max (Model MT5D2LL/A)
- Numerous shader translator updates. Head over to Confetti Shader Translator check them out :-) It is getting more and more stable.
See the release notes from previous releases in the Release section.
-
Windows 10 RS5 with latest update for DXR support
-
Drivers
- AMD / NVIDIA - latest drivers
- Intel - we need to test this. Last time we looked the driver still didn't have full DirectX 12 and Vulkan support and the Visibility Buffer didn't run.
-
Visual Studio 2017 with Windows SDK / DirectX version 17763.132 https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
-
Vulkan 1.1.92.1
-
The Forge is currently tested on
- AMD 5x, VEGA GPUs (various)
- NVIDIA GeForce 9x, 10x, 20x GPUs (various)
- Intel Skull Canyon
-
macOS Mojave 10.14.4 beta (18E174f)
-
Xcode 10.2 beta (10P82s)
-
The Forge is currently tested on the following macOS devices:
- iMac with AMD RADEON 560 (Part No. MNDY2xx/A)
- iMac with AMD RADEON 580 (Part No. MNED2xx/A)
- MacBook Pro 13 inch (MacBookPro13,2)
- Macbook Pro 13 inch (MacbookPro14,2)
In the moment we do not have access to an iMac Pro or Mac Pro. We can test those either with Team Viewer access or by getting them into the office and integrating them into our build system. We will not test any Hackintosh configuration.
-
iOS 12.2 beta (16E5181f)
-
XCode: see macOS
To run the unit tests, The Forge requires an iOS device with an A9 or higher CPU (see GPU Processors or see iOS_Family in this table iOS_GPUFamily3_v3). This is required to support the hardware tessellation unit test and the ExecuteIndirect unit test (requires indirect buffer support). The Visibility Buffer doesn't run on current iOS devices because the texture argument buffer on those devices is limited to 31 (see Metal Feature Set Table and look for the entry "Maximum number of entries in the texture argument table, per graphics or compute function") , while on macOS it is 128, which we need for the bindless texture array.
We are currently testing on
- iPhone 7 (Model A1778)
- iPad (Model A1893)
- iPhone Xs Max (Model MT5D2LL/A)
-
Ubuntu 18.04 LTS Kernel Version: 4.15.0-20-generic
-
GPU Drivers:
- AMDGpu-Pro 18.30-641594
- NVIDIA Linux x86_64/AMD64/EM64T 390.87 You can update using the command line too https://tecadmin.net/install-latest-nvidia-drivers-ubuntu/
-
Workspace file is provided for codelite 12.0.6
-
Vulkan SDK Version: download the native Ubuntu Linux package for all the elements of the Vulkan SDK LunarG Vulkan SDK Packages for Ubuntu 16.04 and 18.04
-
The Forge is currently tested on Ubuntu with the following GPUs:
- AMD RADEON RX 480
- AMD RADEON VEGA 56
- NVIDIA GeForce GTX 950
Make sure VulkanSDK environment variables are configured correctly. Please read the "Set up the Runtime Environment" and "Environment Variable Persistence" https://vulkan.lunarg.com/doc/sdk/1.1.70.1/linux/getting_started.html
-
Android Phone with Android Pie (9.x) for Vulkan 1.1 support
-
Android Studio with API level 28 and follow the instructions
-
We are currently testing on
- Essential Phone with Android 9.0 - Build PPR1.181005.034
In the moment we only support the first two unit tests. We are waiting for devkits with more stable drivers before we bring over the other unit tests. The Essential phone uses an Adreno 540 GPU. Please check out Vulkan Gpuinfo.org for the supported feature list of this GPU with Android 9.0.
-
For PC Windows run PRE_BUILD.bat. It will download and unzip the art assets and install the shader builder extension for Visual Studio 2017.
-
For Linux and Mac run PRE_BUILD.command. If its the first time checking out the forge make sure the PRE_BUILD.command has the correct executable flag by running the following command chmod +x PRE_BUILD.command
It will only download and unzip required Art Assets (No plugins/extensions install).
This unit test just shows a simple solar system. It is our "3D game Hello World" setup for cross-platform rendering.
This unit test shows a Julia 4D fractal running in a compute shader. In the future this test will use several compute queues at once.
This unit test shows how to generate a large number of command buffers on all platforms supported by The Forge. This unit test is based on a demo by Intel called Stardust.
This unit test shows the difference in speed between Instanced Rendering, using ExecuteIndirect with CPU update of the indirect argument buffers and using ExecuteIndirect with GPU update of the indirect argument buffers. This unit test is based on the Asteroids example by Intel.
Using ExecuteIndirect with GPU updates for the indirect argument buffers
Using ExecuteIndirect with CPU updates for the indirect argument buffers
This unit test shows the current state of our font rendering library that is based on several open-source libraries.
This unit test shows a range of game related materials:
Hair:
Metal:
Wood:
This unit test showcases the rendering of grass with the help of hardware tessellation.
In the spirit of the shadertoy examples this unit test shows a procedurally generated planet.
This unit test shows various shadow and lighting techniques that can be chosen from a drop down menu. There will be more in the future.
iMac with AMD RADEON 580 (Part No. MNED2xxA) with resolution of 5120x2880:
iPhone 7 iOS 12.1.4 (16D57) with a resolution of 1334x750:
Linux Ubuntu 18.04.1 LTS Vulkan 1.1.92 RADEON 480 Driver 18.30 with a resolution of 1920x1080:
This unit test was build by Kostas Anagnostou @KostasAAA to show how to ray trace shadows without using a ray tracing API like DXR / RTX. It should run on all GPUs (not just NVIDIA RTX GPUs) and the expectation is that it should run comparable with a DXR / RTX based version even on a NVIDIA RTX GPU. That means the users of your game do not have to buy a NVIDIA RTX GPU to enjoy HRT shadows :-)
This unit test shows reflections that are ray traced. It is an implementation of the papers Optimized pixel-projected reflections for planar reflectors and IMPLEMENTATION OF OPTIMIZED PIXEL-PROJECTED REFLECTIONS FOR PLANAR REFLECTORS
This unit test shows a typical VR Multi-GPU configuration. One eye is rendered by one GPU and the other eye by the other one.
This unit test shows how to switch between the Vulkan and DirectX 12 graphics API during run-time.
This unit test shows how the integration of imGui with a wide range of functionality.
This unit test compares various Order-Indpendent Transparency Methods. In the moment it shows:
- Alpha blended transparency
- Weighted blended Order Independent Transparency (Morgan McGuire Blog Entry 2014)[http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html] and (Morgan McGuire Blog Entry 2015)[http://casual-effects.blogspot.com/2015/03/implemented-weighted-blended-order.html]
- Weighted blended Order Independent Transparency by Volition (GDC 2018 Talk)[https://www.gdcvault.com/play/1025400/Rendering-Technology-in-Agents-of]
- Adaptive Order Independent Transparency with Raster Order Views (paper by Intel, supports DirectX 11, 12 only)[https://software.intel.com/en-us/articles/oit-approximation-with-pixel-synchronization-update-2014], and a (Primer)[https://software.intel.com/en-us/gamedev/articles/rasterizer-order-views-101-a-primer]
- Phenomenological Transparency - Diffusion, Refraction, Shadows by (Morgan McGuire)[https://casual-effects.com/research/McGuire2017Transparency/McGuire2017Transparency.pdf]
This unit test shows how to use the new wave intrinsics. Supporting Windows with DirectX 12 / Vulkan, Linux with Vulkan and macOS / iOS.
Ray Tracing API unit test, showing how the cross-platfrom Ray Tracing Interface running on Windows, macOS and iOS
PC Windows 10 RS5, DirectX12, GeForce RTX 2070, Driver version 418.81 with resolution 3440x1440:
Mac Mini with Intel Core i5 3GHz cpu with integrated graphics Intel UHD Graphics 630 (Part No. MRTT2RU/A) with resolution 3440x1440:
iPad 6th Generation iOS 12.1.3 (16D39) with a resolution of 2048x1536
This unit test was originally posted on ShaderToy by Inigo Quilez (https://www.shadertoy.com/view/Xds3zN and https://sopyer.github.io/b/post/vulkan-shader-sample/). It shows how a scene is ray marched with shadows, reflections and AO
This unit test shows how to use a high-performance entity component system in The Forge.
This unit test shows how to playback a clip on a rig.
This unit test shows how to blend multiple clips and play them back on a rig.
This unit test shows how to attach an object to a rig which is being posed by an animation.
This unit test shows how to blend clips having each only effect a certain portion of joints.
This unit test shows how to introduce an additive clip onto another clip and play the result on a rig.
This unit test shows how to use a scene of a physics interaction that has been baked into an animation and play it back on a rig.
This unit test shows how to animate multiple rigs simultaneously while using multi-threading for the animation updates.
This unit test shows how to use skinning with Ozz
There is an example implementation of the Triangle Visibility Buffer as covered in various conference talks. Here is a blog entry that details the implementation in The Forge.
Confetti will prepare releases when all the platforms are stable and running and push them to this GitHub repository. Up until a release, development will happen on internal servers. This is to sync up the console, mobile, macOS and PC versions of the source code.
We would appreciate it if you could send us a link in case your product uses The Forge. Here are the ones we received so far:
The Forge is used to build the StarVR One SDK:
The Forge is used as the rendering framework in Torque 3D:
The Forge utilizes the following Open-Source libraries:
- Assimp
- Bullet Physics
- Fontstash
- Vectormath
- Nothings single file libs
- shaderc
- SPIRV_Cross
- TinyEXR
- TinySTL
- Vulkan Memory Allocator
- GeometryFX
- WinPixEventRuntime
- Fluid Studios Memory Manager
- volk Metaloader for Vulkan
- gainput
- Shader Playground
- hlslparser
- imGui
- DirectX Shader Compiler
- Ozz Animation System
- ENTT
- Lua Scripting System
- TressFX
- Micro Profiler