🎲 Modern 3D graphics made simple with C++17 cross-platform framework and rendering abstraction API on top of DirectX 12, Metal & Vulkan
Apache License 2.0
878
stars
52
forks
source link
Version 0.2: Methane Asteroids sample is feature complete with parallel rendering and many performance optimisations supported by Core API, Extensions and Helpers libraries; Linux build enabled with Vulkan implementation stubs; Gitpod cloud-IDE supported #49
Multi-threaded rendering with ParallelRenderCommandList was implemented to reduce CPU frame time.
Dynamic asteroid mesh LOD selection implemented with estimation of visible asteroid screen-size. This resolved main GPU performance bottleneck. Visualisation of asteroid LODs with coloring as well as dynamic changing LODs distribution are available by hot-keys.
16-bit index buffers are used instead of 32-bit index buffers for all meshes.
Asteroids array uniforms buffer update on CPU was significantly accelerated by reducing number of matrix multiplications and using SSE-accelerated implementation of CML matrix multiplication operator.
Minimised pixel overdraw with near-to-far rendering order and inverted depth buffer.
Minimised texture binding calls with binding whole textures array to program argument at once and selecting asteroid texture with texture index uniform.
Application controller added for hot-keys handling:
change scene complexity;
switch parallel rendering;
switch mesh LOD coloring;
change mesh LOD complexity;
show simulation parameters in message box.
Sample is instrumented with scope timers for fast low-overhead profiling.
Methane logo badge rendering added.
Numerous bug fixes.
Graphics Core API new features
RenderPass on Windows now uses native D3D12 render-pass feature whenever possible (closed #47).
ParallelRenderCommandList was added for multi-threaded rendering with an array of internally managed RenderCommandLists into single RenderPass (closed #9).
RenderCommandList now can be reset without RenderState setup.
RenderState was extended:
Depth::write_enabled state was added.
Blending state settings were added.
Incremental state applying was implemented to eliminate repeated state setup in command list.
Program::ResourceBindings improvements:
Resources array binding to program arguments is supported.
Apply behaviour flags added for optimisation purposes.
Parallel initialisation of resource bindings with copying descriptors to GPU.
Context improvements:
clear_color and clear_depth_stencil settings are now optional (closed #40).
Metal frame capture in Xcode is fixed with explicit specification of capture-scope.
Getter of content scaling ratio was added (DPI factor on Windows, Retina factor on MacOS).
Vulkan API implementation stubs added.
Graphics Extensions and Helpers new features
ScreenQuad graphics extension was added.
LogoBadge convenience primitive was added and used for drawing Methane watermark in samples and tutorials (closed #46)
Mesh generators now use 16-bit indices instead of 32-bit for lower memory overhead.
FpsCounter calculates CPU work percent additionally to frame time (displayed in window header HUD), allowing easily detect CPU/GPU-bound scenario.
Platform abstraction and Data modules features
ScopeTimer is implemented for low-overhead profiling.
ParallelFor implementation was updated to use Parallel Primitives Library (PPL) on Windows and home-brewed std::async-based implementation on other platforms.
Graphics::App rendering is suspended when window is minimized (closed #48).
LinuxApp stub implementation added.
External libraries
CML library extended with SSE-accelerated implementation of matrix multiplication operator.
Build infrastructure
Shaders compilation improvements:
Metal Shading Language 2.0 is now used instead of 1.0 on MacOS.
Fixed HLSL shaders compilation with different macro-definition values in build-time.
HLSL shader optimisation compiler flags applied in Release builds.
Build scripts were improved:
CMake build parameters added to script variables.
Build/Posix/Build.sh can be used both on MacOS and Linux.
Build version is now correctly added in application files metadata.
Linux build is now supported both by Build/Posix/Build.sh script, Visual Studio and Azure Pipelines CI.
Gitpod cloud-IDE is now supported:
Gitpod configuration added to repository
Open in Gitpod button added on ReadMe page.
VS Code workspace configuration added.
Resharper C++ configuration was added back to repository.
Sonar Cube binaries updated to latest version, unfortunately static code analysis is still broken.
ParallelRenderCommandList
was implemented to reduce CPU frame time.RenderPass
on Windows now uses native D3D12 render-pass feature whenever possible (closed #47).ParallelRenderCommandList
was added for multi-threaded rendering with an array of internally managedRenderCommandLists
into singleRenderPass
(closed #9).RenderCommandList
now can be reset withoutRenderState
setup.RenderState
was extended:Depth::write_enabled
state was added.Blending
state settings were added.Program::ResourceBindings
improvements:Apply
behaviour flags added for optimisation purposes.Context
improvements:clear_color
andclear_depth_stencil
settings are now optional (closed #40).ScreenQuad
graphics extension was added.LogoBadge
convenience primitive was added and used for drawing Methane watermark in samples and tutorials (closed #46)Mesh
generators now use 16-bit indices instead of 32-bit for lower memory overhead.FpsCounter
calculates CPU work percent additionally to frame time (displayed in window header HUD), allowing easily detect CPU/GPU-bound scenario.ScopeTimer
is implemented for low-overhead profiling.ParallelFor
implementation was updated to use Parallel Primitives Library (PPL) on Windows and home-brewed std::async-based implementation on other platforms.Graphics::App
rendering is suspended when window is minimized (closed #48).LinuxApp
stub implementation added.Build/Posix/Build.sh
can be used both on MacOS and Linux.Build/Posix/Build.sh
script, Visual Studio and Azure Pipelines CI.Open in Gitpod
button added on ReadMe page.