The Forge Versions Save

The Forge Cross-Platform Rendering Framework PC Windows, Steamdeck (native), Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2

v1.47

3 years ago

As the year winds slowly down, we finally found time to do another release. First of all, Happy Holidays and a happy new Year!

Happy Holidays and a happy new Year!

Most of us will take off over the Holiday season and spent time with their families. We should be back online in the middle of January 2021.

  • OpenGL ES 2.0: TF will run on probably several hundred million of mobile devices in the future. It will be the rendering layer of business application frameworks. For this usage case, we added OpenGL ES 2.0 support only for Android. The OpenGL ES 2.0 layer only supports unit tests 1, 5, 12 and 31 at the moment.
  • Device change / reset: we finally implemented all the code that can deal with device changes, device resets or device removed scenarios on all platforms. The underlying design was always there but it took us 3+ years to finally add the functionality :-) When you go into any of the *OSBase.* files you can find a snippet of code that looks like this:
if (pApp->mSettings.mResetGraphics) 
	{
		pApp->Unload();
		pApp->Load();
		pApp->mSettings.mResetGraphics = false;
	}
  • DRED / Breadcrumb support: to be able to better tell what the reason behind a removed device is, we implemented DRED support on PC with DirectX 12 and XBOX. We integrated this into the first functional test 01_Transformations. Here is a screenshot. Look for the "Simulate crash" button:

Image of the Transformations Unit test

Breadcrumb are user defined markers used to pinpoint which command has caused GPU to stall. In the Breadcrumb unit test, two markers get injected into the command list. Pressing the crash button would result in a GPU hang. In this situation, the first marker would be written before the draw command, but the second one would stall for the draw command to finish. Due to the infinite loop in the shader, the second marker won't be written, and we can reason that the draw command has caused the GPU to hang. We log the markers' information to verify this. Check out this link for more info: D3D12 Device Removed Extended Data (DRED)

  • More Lua Scripting support for all functional tests:
    • For the scripted testing of the Unit Tests, this layer provides automated function registration of the UI elements to Lua State.
    • Any UI elements added to the GUI will add a function or a pair of function(Getter/Setter) to the Lua state for using them in any script. Lua function name resolution will work like this:
    • UI Widget "label" name will be included in the function name as follows,
      • For Widget events: label name + "Event Name". e.g., Lua Function name for label - "Press", and event - OnEdited : "PressOnEdited"
      • For Widget modifiers such as ints / floats: "Set" and "Get" function pair will be added as a prefix to label name e.g., "X" variable will have "SetX" and "GetX" pair of functions.
  • After writing the scripts, you can let the layer know about the scripts using AddTestScripts() function call and run them on any frame by RunTestScript() defined in UIApp class. There are examples of these test scripts in most of the UTs showing how you can also add these scripts to UI and test them on runtime.

Here is how the current Lua support in the functional tests might look like:

Lua support

  • DX11 refactor: we re-wrote the DX11 run-time a few times. We ended up with the most straighforward version. This version only recently shipped in Hades along with the Vulkan run-time on PC.

  • YUV support: we have now YUV support for all our Vulkan API platforms PC, Linux, Android and Switch. There is a new functional test for YUV. It runs on all these platforms:

YUV unit test

  • Audio: we removed the audio functional test. It was the only test that was released unfinished and didn't run on all our platforms. Our customers show love for FMOD ... would make more sense to show an integration of that.

  • GitHub issues fixed:

    • #188 - typo - lowercase L in first DepthStencilClearFlags constant "ClEAR_DEPTH"
    • #186 - Ubuntu: Examples fail to build
    • #182 - Flickering on master when vsync is off
    • #176 - [08_GlftViewer] Application crash on missing resource

Numerous other fixes ...

v1.46

3 years ago
  • Supergiant's Hades we are working with Supergiant since 2014. One of the on-going challenges was that their run-time was written in C#. At the beginning of last year, we suggested to help them in building a new cross-platform game engine in C/C++ from scratch with The Forge. The project started in April 2019 and the first version of this new engine launched in May this year. Hades was then released for Microsoft Windows, macOS, and Nintendo Switch on September 17, 2020. The game can run on all platforms supported by The Forge.

Here is a screenshot of Hades running on Switch:

Supergiant Hades

Here is an article by Forbes about Hades being at the top of the Nintendo Switch Charts. Hades is also a technology showcase for Intel's integrated GPUs on macOS and Windows. The target group of the game seems to often own those GPUs.

  • Windows management: there is a new functional test named 32_Window that demonstrates windows management on Windows, Linux and macOS.
    • The window layout, position, and size are now driven by the client dimensions, meaning that the values that the client demands are the exact values the client area will be represented with, regardless of the window style. This allows for much greater flexibility and consistency, especially when working with a fullscreen window.
    • Multi-monitor support has also been improved significantly, offering smooth consistent transitions between client displays and guaranteeing correct window behavior and data retention. Media layer functionality has been expanded, allowing the client to control mouse positioning, mouse visibility, and mouse visual representation.
    • It is now possible to create independent mouse cursors to further customize the application.

Here are the screenshots:

Windows: Windows Management for Windows

macOS: Windows Management for macOS

Linux: Windows Management for Linux

  • Screen-Space reflections: we renamed the functional test "10_PixelProjectedReflections" to 10_ScreenSpaceReflections. You have now two choices: you can pick either Pixel Projected Reflections or AMD's FX Stochastic Screen Space Reflection. We just made AMD's FX code cross-platform. It runs now on Windows, Linux, macOS, Switch, PS and XBOX.

Here are the screenshots:

Windows final scene: AMD FX Stochastic Screen Space Reflections

Without denoising: AMD FX Stochastic Screen Space Reflections before denoise

With denoising: AMD FX Stochastic Screen Space Reflections before denoise

PS4: AMD FX Stochastic Screen Space Reflections on PS4

macOS: AMD FX Stochastic Screen Space Reflections on macOS

  • Resolved GitHub issues:
    • Issue #183 - VERTEX_ATTRIB_RATE_INSTANCE ignored on macOS 10.12, iOS 10.0

v1.45

3 years ago
  • TressFX: we upgraded TressFX a bit and retuned the lighting.

Here are the screenshots: Black hair

Blond hair

Brown hair

Red hair

  • File system: our old file system was designed more for tools or Windows applications than for games. It consumed more memory than the whole rendering system and used Windows file methods extensively. That is the opposite of what you want in a game. It took us now several months to correct the mistake and come up with a file system that is tailored towards games. That means that the interface changed substantially. Thanks to all those who pointed this out. Sometimes it takes a couple of iterations to land on a design that is efficient. If you look at the new interface there are still path related functions in there. They will be removed step-by-step. Please check out the new file system interface and let us know what you think.

  • Android Vulkan: validation layer is now supported

v1.44

3 years ago
  • Mobile Devices: DPI scaling is properly handled now so we shouldn't see messed up UI anymore on mobile devices

  • Android: the following Unit-tests are now included for Android:

    • 03_MultiThread 03_MultiThread
    • 04_ExecuteIndirect 04_ExecuteIndirect
    • 07_Tesselation 07_Tesselation
    • 10_PixelProjectedReflections 10_PixelProjectedReflections
    • 12_ZipFileSystem 12_ZipFileSystem
    • 13_UserInterface 13_UserInterface
    • 14_WaveIntrinsics 14_WaveIntrinsics
    • 15_Transparency 15_Transparency
  • gamepad support: tested with PS4 controller

  • sample size reduction

  • proper closing of apps with the back button

  • proper handling of vSync

  • .zip filesystem handling

  • shader compile #include directive support

  • overall stability improvements

  • improved swapchain creation process and proper handling of current frame index

  • Linux:

    • Window management is improved
    • Borderless fullscreen is supported
    • Implemented full screen toggle (usually alt-enter)
    • Cursor position is now correct
    • Camera movement with mouse now works properly
    • Resources are freed properly

v1.43

3 years ago
  • Filesystem: it turns out the file system is still confusing and not intuitive. It mixes up several concepts but is not consistent and somehow favors Windows folder naming conventions, that do not exist in most of our target platforms. We did a slight first step with this release. We need to make a deeper change with the next release.
  • DirectX 11: the DirectX 11 run-time gets a lot of mileage now. For one game it went now successfully through a test center. This release holds a wide range of changes especially for multi-threaded rendering.
  • MTuner : we are making another attempt on integrating MTuner into the framework. We need it to tune memory usage in some game titles. The current version only reliably supports Windows but we try to extend it to more platforms.
    • Integrated Milos Tosic’s MTuner SDK into the Windows 10 runtime of The Forge. Combined with mmgr, this addition will provide the following features:
      • Automatic generation of .MTuner capture file alongside existing .memleaks file.
      • In-depth analysis of the generated file using MTuner’s user-friendly UI app.
      • Clear and efficient highlighting of memory leaks and usage hotspots.
    • Support for additional platforms coming soon!

MTuner MTuner was integrated into the Windows 10 runtime of The Forge following a request for more in-depth memory profiling capabilities by one of the developers we support. It has been adapted to work closely with our framework and its existing memory tracking capabilities to provide a complete picture of a given application’s memory usage.

To use The Forge’s MTuner functionality, simply drag and drop the .MTuner file generated alongside your application’s executable into the MTuner host app, and you can immediately begin analyzing your program’s memory usage. The intuitive interface and exhaustive supply of allocation info contained in a single capture file makes it easy to identify usage patterns and hotspots, as well as tracking memory leaks down to the file and line number. The full documentation of MTuner can be found [here](link: https://milostosic.github.io/MTuner/).

Currently, this feature is only available on Windows 10, but support for additional platforms provided by The Forge is forthcoming. Here is a screenshot of an example capture done on our first Unit Test, 01_Transformations: MTuner

  • Multi-Threading system: especially for the Switch run-time we extended our multi-threading system to support a "preferred" core.
  • macOS / iOS run-time got another make over. This time we brought the overall architecture a bit closer to the rest of the rendering system and we are also working towards supporting lower end hardware like a 2015 MacBook Air and macOS 10.13.6. Those requirements were based on the Steam Hardware Survey.
  • there are now functions that help you calcuate the memory usage supported by all APIs: look for caculateMemoryUse / freeMemoryStats
  • Windows management got a bit more flexible by offering borderless windows and more style attributes
  • 17_EntityComponentSystem runs now better on AMD CPUs ... there were some inefficiencies in the unit test ...

v1.42

3 years ago

Most of us are working from home now due to the Covid-19 outbreak. We are all trying to balance life and work in new ways. Since the last release we made a thorough pass through the macOS / iOS run-time, so that it is easier to make macOS your main development environment for games. Unit-tests fixes:

  • Fixed wrong project ordering in XCode
  • Fixed build-time macOS / iOS warnings.
  • Fixed 03_Multithread until test not showing the appropriate charts for all threads
  • Fixed warnings in 06_MaterialPlayground due to wrong GLTF validation
  • Fixed visual artifacts in 08_GLTFViewer not producing correct normals due to wrong Metal shader.
  • Added missing projects to macOS / iOS workspace and removed unnecessary ones.
  • Fixed unit test 14_WaveIntrinsics macOS on AMD iMac. Implemented workaround for AMD driver issue on macOS.

Metal runtime fixes:

  • Fixed Metal issue handling barriers: scheduled barriers were being ignored, introducing visual artifacts due to read-write race condition.

Closed Issues:

  • #168 - 04_ExecuteInDirect poor performance on MacPro 2019, AMD Vega II, Catalina 10.15.3
  • #156 - Benchmark support?

v1.41

3 years ago
  • Based on request we are providing a Path Tracing Benchmark in 16_RayTracing. It allows you to compare the performance of three platforms:

    • Windows with DirectX 12 DXR
    • Windows with Vulkan RTX
    • Linux with Vulkan RTX

    We believe that every benchmarking tool should be open-source, so that everyone can see what the source code is doing. We will extend this benchmark to the non-public platforms we support to compare the PC performance with console performance. The benchmark comes with batch files for all three platforms. Each run generates a HTML output file from the microprofiler that is integrated in TF. The default number of iterations is 64 but you can adjust that. There is a Readme file in the 16_RayTracing folder that describes the options.

Windows DirectX 12 DXR, GeForce RTX 2070 Super, 3840x1600, NVIDIA Driver 441.99

Windows DXR output of Ray Tracing Benchmark

Windows Vulkan RTX, GeForce RTX 2070 Super, 3840x1600, NVIDIA Driver 441.99

Windows RTX output of Ray Tracing Benchmark

Linux Vulkan RTX, Geforce RTX 2060, 1920x1080, NVIDIA Driver 435.21

Linux RTX output of Ray Tracing Benchmark

We will adjust the output of the benchmark to what users request.

  • With this release we also aligned the whole renderer interface better to 64 byte CPU cache lines. We trimmed down all the structs substantially and removed many. This is a breaking change for the renderer interface and a major change to the whole code base.
  • DirectX 12
    • D3D12 Memory Allocator: we are using now AMD's D3D12 memory allocator for DirectX after having used the Vulkan equivalent for more than two years. We also extended it to support Multi-GPU.
    • We upgraded to the latest dxgi factory interface in DirectX 12
  • Microprofiler: because we need the microprofiler to offer the QA department help in reporting performance problems for some of the games that will be shipping with TF (and the benchmark mentioned above), we did another pass on its functionality and ease of use, especially on console platforms. The idea is that QA can quickly and easily store a screenshot or HTML file in a bug report. This is still work in progress and with every shipping game will probably be improved.
  • Now that GDC 2020 was postponed, we will also postpone our GDC related activities. The user meeting and our GDC talk will be postponed until the next GDC happens. If there is a need we can also do a user meeting in an online conference room or in Discord in a private area. Let us know.
  • Renamed CustomMiddleware to Custom-Middleware back ...

v1.40

3 years ago

This release took much longer than expected ... :-)

  • We are going to give a talk at GDC during the GPU Summit day. It will cover our skydome system Ephemeris 2: GDC 2020 Ephemeris
  • We will also have a user group meeting during GDC: The Forge User Group
  • A new resource loader can now stream textures, buffers and additionally geometry (extracted from glTF) asynchronously. We replaced assimp with this loader to save compile time and space on GitHub. We still use assimp for our internal tools. Here are the underlying design principles of the resource loader:
    • Generally glTF is just a geometry container for us. We do not apply any of the underlying principles like material or mesh or scene management that it offers because they are not tailored to our needs. The resource loader only loads a glTF file, extract its geometry and stores this data (including hair and ozz animation system data) in a vertex and index buffer stream.
    • All texture loading and material loading is the responsibility of the app. Scene partitioning or material support is not used from glTF. Those remain on the App level. Each app has its own lighting and material models and it shouldn't be restricted to the very limiting architecture of glTF
    • There is no glTF code in any of the unit tests or app examples with the exception of the glTF viewer. The resource loader loads geometry just with a addResource call as it loads textures and buffers ... it can generate a vertex and index buffer stream with offset values for draw calls or for ExecuteIndirect ...
  • All model art assets were converted to glTF
  • libzip was replaced with zip because it is easier to maintain.
  • Console support: at the end of last year before our three week break, we made the PS4 and Switch run-times ready to ship games (we will see first games shipping this year). We also started on the PS5 and XBOX One Series X support. You need to be an acredited developer to receive the source code for any consoles. We will be asking the console owner for permission before we would provide you with any source code. That means you have to be part of their developer program.
  • Improved Windows 7 support: one of the games TF is launching with requires Windows 7 support. This means we are now testing the Windows 7 run-time more rigourously and committed fixes with this release
  • Math library: added missing vec2 functions
  • Updated copyright statement
  • Resolved issues on GitHub:
    • issue 162 - 13_UserInterface - Crash
    • issue 161 - 18_VirtualTexture breaks with dx and vk: only fairly decent cards support virtual textures. We added tracking support in the *.cfg system and throw an error message when the GPU doesn't support the feature.
    • issue 124 - Missing KeyKpAdd mapping

v1.39

4 years ago

The Forge has now support for Sparse Virtual Textures on Windows and Linux with DirectX 12 / Vulkan. Sparse texture (also known as "virtual texture", “tiled texture”, or “mega-texture”) is a technique to load huge size (such as 16k x 16k or more) textures in GPU memory. It breaks an original texture down into small square or rectangular tiles to load only visible part of them.

The unit test 18_Virtual_Texture is using 7 sparse textures:

  • Mercury: 8192 x 4096
  • Venus: 8192 x 4096
  • Earth: 8192 x 4096
  • Moon: 16384 x 8192
  • Mars: 8192 x 4096
  • Jupiter: 4096 x 2048
  • Saturn: 4096 x 4096

There is a unit test that shows a solar system where you can approach planets with Sparse Virtual Textures attached and the resolution of the texture will increase when you approach.

Linux 1080p NVIDIA RTX 2060 Vulkan Driver version 435

Sparse Virtual Texture on Linux Vulkan

Windows 10 1080p AMD RX550 DirectX 12 Driver number: Adrenaline software 19.10.1

Sparse Virtual Texture on Windows 10 DirectX 12

Windows 10 1080p NVIDIA 1080 Vulkan Driver number: 418.81

Sparse Virtual Texture on Windows Vulkan

Sparse Virtual Texture on Windows Vulkan

Ephemeris 2 - the game Stormland from Insomniac was released. This game is using a custom version of Ephemeris 2. We worked for more than six months on this project.

Stormland

Stormland

Stormland

Stormland

Stormland

Stormland

Stormland

Head over to Custom Middleware to check out the source code.

v1.38

4 years ago
  • The new 16_Raytracing unit test shows a simple cross-platform path tracer. On iOS this path tracer requires A11 or higher. It is meant to be used in tools in the future and doesn't run in real-time. To support the new path tracer, the Metal raytracing backend has been overhauled to use a sort-and-dispatch based approach, enabling efficient support for multiple hit groups and miss shaders. The most significant limitation for raytracing on Metal is that only tail recursion is supported, which can be worked around using larger per-ray payloads and splitting up shaders into sub-shaders after each TraceRay call; see the Metal shaders used for 16_Raytracing for an example on how this can be done.

macOS 1920x1080 AMD Pro Vega 64

Path Tracer running on macOS

iOS iPhone X 812x375

Path Tracer running on macOS

Windows 10 1080p NVIDIA RTX 2080 with DXR Driver version 441.12

Path Tracer running on Windows DXR

Windows 10 1080p NVIDIA RTX 2080 with RTX Driver version 441.12

Path Tracer running on Windows RTX

Linux 1080p NVIDIA RTX 2060 with RTX Driver version 435

Path Tracer running on Linux RTX

  • File System: Fixed an issue wherein compiled shader binaries weren’t being saved to the RD_SHADER_BINARIES resource directory
  • GitHub issues fixed:
    • #150 - [Vulkan] Failed to extend descriptor pool
    • #151 - [Vulkan] rootcbv of detection is case sensitive
    • #152 - [Vulkan] updateDescriptorSet is different from the DirectX12