The Forge

Company: The Forge

Role: Graphics Programmer

Engine: The Forge cross-platform rendering framework

Language: C / C++ (Python for tools)

Platforms: Windows, Android,  macOS, iOS, Linux, PS4, PS5, Xbox One, Xbox Series X, Switch

Graphics APIs: Vulkan, D3D12, Metal, GLES

Tools: RenderDoc, PIX, Metal Debugger, RazorGPU

Work Period: March 2022 – January 2024 (1 year 11 months)

The Forge Rendering Framework

Maintain The Forges’ cross-platform rendering framework, develop new features and fix existing bugs on all platforms supported by The Forge.

  • Maintained and developed new features in The Forges’ renderer for all platforms supported by The Forge (Windows, Android,  macOS, iOS, Linux, PS4, PS5, Xbox One, Xbox Series X, Switch).
  • Implemented animation support in the The Forges’ Visibility Buffer, by using compute shaders, to filter skinned triangles before sending them through the graphics pipeline.
    • The Visibility Buffer is a modern rendering technique that uses compute shaders to filter out triangles that are not visible (either because they’re too small or are back facing) before sending them through the GPU pipeline.
    • The challenge with animations in the Visibility Buffer is that the vertexes need to be already transformed by the skinning matrices before they can be filtered by the first stage of the Visibility Buffer, the Triangle Filtering stage.
    • For more details on the implementation, see the documentation in The Forges’ GitHub repository.
  • Programmed a C++ code hot-reloading example in The Forge to be able to update, recompile and reload C++ code while the program was running. Implemented this example using the CR library by fungos.
  • Integrated new features and fixed bugs in the Forge Shading Language (FSL).
    • FSL is a custom shader language that is used to generate shaders for all target platforms supported by TheForge. It’s implemented using Python.
  • Refactored the code-base and added the FORGE_API macro to be able to compile The Forge as a dynamic library to achieve several benefits in users of the library:
    • Allow users of The Forge to select the best build type for their use-case. On final release builds it’s better to use static linkage to benefit from link time optimizations. But using static linking during development could make linking times longer, using dlls provide faster iteration time during development.
    • Ability to have hot-reloadable C++ modules on the user application.
  • Worked in a de-localized team with members in different time zones effectively.

Hytale

During my time at The Forge I also work on a client project developing a new game engine for Hytale, a voxel based sandbox game using The Forge as the platform abstraction layer and rendering framework.

This is some of the work I did in the Hytale project:

  • Integrated TheForges’ Visibility Buffer into the new Hytale engine.
  • Ported the engine to Android, set up FastBuild scripts and fix build/deployment issues to be able to test the engine on Android.
  • Optimized voxel mesh GPU memory  usage by 77% leveraging knowledge about the data layout.
    • One of the optimizations included changing floats for integers, packing what initially were three XYZ floats (12 bytes) to use just one one unsigned integer (4 bytes) where the positions were packed in bit-fields. With some additional free bits to store future data.
  • Leveraged the FLECS library to allow the gameplay systems (which were implemented using FLECS) to interface with the low-level rendering systems.
  • Implemented an LOD system for the voxelized world to improve performance when having a high view distance.
    • Based on distance to the camera, farther away chunks would generate less detailed meshes.
  • Developed and integrated a ContentPipeline tool to cook all the assets during the build process.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at WordPress.com

Up ↑