Cross-platform Vulkan based 3D rendering engine for .Net Apps
Ab4d.SharpEngine is a blazing fast 3D rendering engine that can be used in desktop and mobile .Net Apps.
The main goals of the Ab4d.SharpEngine are:
- Easy to use:
The engine was created after having a lot of experience with the highly popular Ab3d.PowerToys and Ab3d.DXEngine
libraries that were used in many professional 3D applications but can work only on Windows (see example app).
- High performance:
Vulkan API is a high performance and low overhead graphics API that can squeeze as much performance from the graphics card as possible.
By using Vulkan best practices, knowledge and algorithms from Ab3d.DXEngine and high optimizations of .Net 6 and newer .Net versions, the engine is built to provide blazing fast rendering.
- General purpose:
The engine supports any coordinate system (y-up or z-up, right-handed or left-handed) and can be used by users that are used to any other 3D workflow.
- Cross-platform and multi UI framework:
Vulkan API and .Net 6+ can run on any CPU and platform. The plan is to provide easy to use integration and support for most of the UI frameworks.
- Minimal dependencies:
Core Ab4d.SharpEngine assembly has no third-party dependencies. Assemblies that provide integration with UI framework depend only on that framework and not other third-party library.
Also, png file reader and writer is included into the core library.
Traditionally C++ was used for rendering 3D graphics. But .Net has become so well optimized and fast (see example)
that it has become a perfect choice for 3D graphics because C++ does not produce that much faster code that it would justify much more complex development.
The engine uses Vulkan 3D that is a high performance next-generation graphics API.
It is also cross-platform and this allows the Ab4d.SharpEngine to run on the following platforms:
- Windows 7, 8, 10, 11 (including virtual machine or server *)
- Linux (including Raspberry Pi 4 and 5**)
- Mac OS
- Android
- iOS
* See instructions on how to use Vulkan in a Virtual machine or on a server.
** See instructions on how to run Ab4d.SharpEngine on Raspberry Pi 4 with a touch screen.
The engine can be integrated into almost any UI framework. The following UI frameworks are supported:
- Avalonia UI (Windows, Linux, MacOS, Android, iOS; use Ab4d.SharpEngine.AvaloniaUI NuGet package)
- WPF (Windows; use Ab4d.SharpEngine.Wpf NuGet package)
- WinUI 3 (Windows; use Ab4d.SharpEngine.WinUI NuGet package)
- .NET MAUI (Windows, Android, macOS, iOS)
- ImGui (Windows, Linux, MacOS; use ImGui.NET NuGet package)
- LinuxFramebuffer (Linux - usually for embedded devices)
- WinForms (Windows; use Ab4d.SharpEngine.WinForms NuGet package)
- SDL, Glfw (Windows, Linux; use Silk.NET.Windowing NuGet package)
In any UI framework it is also possible to render to an offscreen texture. That texture can be read by the application or saved to an image file. Offscreen rendering can work with hardware or software rendering - can be also used on a sever or VM by using LLVMpipe.
Minimum requirements
Ab4d.SharpEngine requires Vulkan support to be able to render the 3D scene. Vulkan is supported on all newer GPUs and many older graphics devices.
Quick info for Windows:
- NVIDIA supports Vulkan 1.3 from the Maxwell architecture on (introduced in 2015). Kepler cards support Vulkan 1.2
- Intel supports Vulkan 1.3 on Intel Arc graphics cards and all integrated GPUs from the Skylake (6000+ series; introduced in 2017).
- AMD supports Vulkan 1.3 on GCN 4 and newer (Radeon 400+ series; introduced in 2016) and Vulkan 1.2 on older GCN series (introduced in 2012).
See Wikipedia article for more details and other platforms.
On unsupported system, it is possible to use a software rendered - see instructions on how to use software llvmpipe.
Samples and downloads
GitHub samples:
NuGet packages:
Click
here to create a 60-day trial license for Ab4d.SharpEngine.
Screenshots on different platforms and UI frameworks
Samples screenshots