GitHub Project: Andarael/resurfacing
Paper link : Real-time procedural resurfacing using GPU mesh shader
This project demonstrates the use of GPU mesh shaders to enhance object surfaces in real-time. The application is written in C++ and GLSL, utilizing the Vulkan API.
- Operating System: Windows
- GPU: NVIDIA GPU (RTX Ampere or Ada architecture)
- Graphics API: Vulkan, with shaderc.
- Build System: MS-Build and CMake DISCLAIMER, minimal configuration requires a GPU supporting Mesh Shader. Trying to run this on a non-Windows machine or a non-Nvidia GPU is at your own risk.
- A
.batis provided to generate a visual studio solution. - Shaders are automatically compiled once at build time.
- Note : Mesh loading is way faster in the release build.
Reshade package can be used for post-processing effects such as ambiant occlusion. Reshade source code needed to be modified to make it compatible with our Vulkan engine. As of the first public release of our demo application, no reshade integration is provided yet. ReShade support is planned for the next build.
In the resurfacing settings in individual models settings, the user can select the type of element to be used for the resurfacing. Element parametric properties (such as torus radii) can be controlled, as well as orientation and scaling. Element's maximum resolution can be set independently on u and v directions. By default, the mapping function F maps an element by face and an element by vertex. Normal1 and Normal2 allows for vertex and face issued elements to be oriented in different ways.
When the element type is set to `B-Spline' and a control cage has been loaded, the elements will use the control cage to sample the parametric surface. Control cages must be provided in a quad grid format, similar to Blender's "Nurbs Surface" object. The default control cage is a shaped as a scale.
The pebble mapping function, maps a single element per face of the base mesh. Roundness, size and extrusion amount can be controlled. Procedural surface noise can be enabled on the pebbles.
- LOD (Level of Detail): Dynamically reduces element resolution based on screen-space size. Minimum resolution and LOD factors can be adjusted.
- Culling: Removes elements outside the camera frustum. Backface culling uses a normal cone, which can be adjusted using the threshold value.
Detailed GPU performance metrics are displayed as "GPU Time", using precise GPU counters. Global application performance (including CPU Skinig operations and shading) is also displayed in the top bar.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) License.
You may:
- Share — Copy and redistribute the material in any medium or format.
- Adapt — Remix, transform, and build upon the material.
Under the following terms:
- Attribution — You must give appropriate credit and indicate if changes were made.
- NonCommercial — You may not use the material for commercial purposes.
Full license details: CC BY-NC 4.0