All Projects → GPUOpen-Effects → FidelityFX-SPD

GPUOpen-Effects / FidelityFX-SPD

Licence: MIT License
Single Pass Downsampler (SPD)

Programming Languages

objective c
16641 projects - #2 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to FidelityFX-SPD

FidelityFX-SSSR
Stochastic Screen Space Reflections (SSSR)
Stars: ✭ 130 (+38.3%)
Mutual labels:  cauldron, dx12, fidelityfx, gpuopen
FidelityFX-LPM
Luma Preserving Mapper (LPM)
Stars: ✭ 69 (-26.6%)
Mutual labels:  cauldron, dx12, fidelityfx, gpuopen
Explosion
💥 A modern cross-platform game engine (WIP)
Stars: ✭ 102 (+8.51%)
Mutual labels:  vulkan, dx12
pygfx
Like ThreeJS but for Python and based on wgpu
Stars: ✭ 72 (-23.4%)
Mutual labels:  vulkan, dx12
wgpu-py
Next generation GPU API for Python
Stars: ✭ 210 (+123.4%)
Mutual labels:  vulkan, dx12
Gfx
[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
Stars: ✭ 5,045 (+5267.02%)
Mutual labels:  vulkan, dx12
FANCY
A rendering-framework for DX12 and Vulkan. Mostly intended for personal learning purposes and graphics demos
Stars: ✭ 21 (-77.66%)
Mutual labels:  vulkan, dx12
Xacor
Experimental Game Engine
Stars: ✭ 24 (-74.47%)
Mutual labels:  vulkan, dx12
gearoenix
Cross-platform C++ 3D game engine.
Stars: ✭ 33 (-64.89%)
Mutual labels:  vulkan
nanovg vulkan
Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations. (added Vulkan support)
Stars: ✭ 26 (-72.34%)
Mutual labels:  vulkan
solo
Small C++ game engine with Lua scripting
Stars: ✭ 26 (-72.34%)
Mutual labels:  vulkan
CrossWindow-Graphics
A header only library to simplify creating 🌋 Vulkan / ⚪ OpenGL / 🌐 WebGL / ❎DirectX / 🤖 Metal data structures with CrossWindow.
Stars: ✭ 48 (-48.94%)
Mutual labels:  vulkan
demos
OpenGL and Vulkan graphics experiments and samples
Stars: ✭ 34 (-63.83%)
Mutual labels:  vulkan
osre
An open source render engine
Stars: ✭ 95 (+1.06%)
Mutual labels:  vulkan
vulkan-raytracing
"Simple" Vulkan raytracing
Stars: ✭ 27 (-71.28%)
Mutual labels:  vulkan
YALCT
Yet Another Live Coding Tool - Powered by Veldrid and elbow grease
Stars: ✭ 25 (-73.4%)
Mutual labels:  vulkan
Usagi
A hierarchical component entity system based game engine
Stars: ✭ 44 (-53.19%)
Mutual labels:  vulkan
Vulkan-Tutorial-Java
Vulkan tutorial by Alexander Overvoorde ported to Java
Stars: ✭ 89 (-5.32%)
Mutual labels:  vulkan
openvr fsr
Add Image Upscaling via AMD FidelityFX SuperResolution or NVIDIA Image Scaling to SteamVR games
Stars: ✭ 1,182 (+1157.45%)
Mutual labels:  fidelityfx
kool
A Vulkan/OpenGL engine for Desktop Java and Javascript written in Kotlin
Stars: ✭ 76 (-19.15%)
Mutual labels:  vulkan

FidelityFX SPD

Copyright (c) 2020 Advanced Micro Devices, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Changelist v2.0

  • Added support for cube and array textures. SpdDownsample and SpdDownsampleH shader functions now take index of texture slice as an additional parameter. For regular texture use 0.
  • Added support for updating only sub-rectangle of the texture. Additional, optional parameter workGroupOffset added to shader functions SpdDownsample and SpdDownsampleH.
  • Added C function SpdSetup that helps to setup constants to be passed as a constant buffer.
  • The global atomic counter is automatically reset to 0 by the shader at the end, so you do not need to clear it before every use, just once after creation

Single Pass Downsampler - SPD

FidelityFX Single Pass Downsampler (SPD) provides an RDNA-optimized solution for generating up to 12 MIP levels of a texture.

  • Generates up to 12 MIP levels (maximum source texture size is 4096x4096) per slice.
  • Supports Texture2DArrays / CubeTextures: downsamples all slices within one single disptach call.
  • Single compute dispatch.
  • User defined 2x2 reduction function.
  • User controlled border handling.
  • Supports various image formats.
  • HLSL and GLSL versions available.
  • Rapid Packed Math support.
  • Uses optionally subgroup operations / SM6+ wave operations, which can provide faster performance.
  • Supports downsampling of a sub-rectangle from the source texture: useful for atlas textures in which only a known region got updated

Sample Build Instructions

  1. Clone submodules by running 'git submodule update --init --recursive' (so you get the Cauldron framework too)
  2. Run sample/build/GenerateSolutions.bat
  3. Open solution, build + run + have fun 😊

SPD Files

You can find them in ffx-spd

  • ffx_a.h: helper file
  • ffx_spd: contains the SPD function and integration documentation

Sample

Downsampler

  • PS: computes each mip in a separate pixel shader pass
  • Multipass CS: computes each mip in a separate compute shader pass
  • SPD CS: uses the SPD library, computes all mips (up to a source texture of size 4096²) in a single pass

SPD Load Versions

  • Load: uses a load to fetch from the source texture
  • Linear Sampler: uses a sampler to fetch from the source texture. Sampler must meet the user defined reduction function.

SPD WaveOps Versions

  • No-WaveOps: uses only LDS to share the data between threads
  • WaveOps: uses Intrinsics and LDS to share the data between threads

SPD Non-Packed / Packed Versions

  • Non-Packed: uses fp32
  • Packed: uses fp16, reduced register pressure

Recommendations

We recommend to use the WaveOps path when supported. If higher precision is not needed, you can enable the packed mode - it has less register pressure and can run a bit faster as well. If you compute the average for each 2x2 quad, we also recommend to use a linear sampler to fetch from the source texture instead of four separate loads.

Known issues

Please use driver 20.8.3 or newer. There is a known issue on DX12 when using the SPD No-WaveOps Packed version. It may appear as "Access violation reading location ..." during CreateComputePipelineState, with top of the stack pointing to amdxc64.dll. To workaround this issue, you may advise players to update their graphics driver or don't compile and use a different SPD version, e.g. a Non-Packed version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].