GithubHelp home page GithubHelp logo

w199753 / fidelityfx-fsr2-unity-urp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gpuopen-effects/fidelityfx-fsr2-unity-urp

1.0 0.0 0.0 10.42 MB

FidelityFX FSR 2 for the Unity URP

License: MIT License

C++ 82.93% CMake 17.07%

fidelityfx-fsr2-unity-urp's Introduction

Integrating AMD FidelityFX™ Super Resolution 2 (FSR 2) into Unity URP

AMD FidelityFX Super Resolution 2 (FSR2) is an open source, high-quality solution for producing high resolution frames from lower resolution inputs. FSR2 uses temporal feedback to reconstruct high-resolution images while maintaining and even improving image quality compared to native rendering.

FSR2 can enable “practical performance” for costly render operations, such as hardware ray tracing.

Version

While this patch targets URP 12.1.7 in particular, you can still use this patch for other versions (including newer) with a few careful changes. Note that this version of the patch supports DX11 only.

Integration method

  1. Apply 0001-Added-FSR2-support-for-URP.patch to your local URP repository.

    • If you can't use git apply <path to patch> directly due to your own modifications, merge this patch into your local code manually.
  2. Apply 0001-fsr-2.2-dx11-backend.patch to FidelityFX-FSR2 @v2.2.1.

  3. Follow the build instruction from here to compile the FSR 2 API library.

    • For DirectX® 11, you should run GenerateSolutionDX11.bat instead of GenerateSolutions.bat to get the Visual Studio® solution file (.sln).
  4. Generate the VisualStudio solution (.sln) file with CMake for the plugin.

    Generate VS sln
    • UNITY_PLUGINAPI_INCLUDE_DIR: Unity plugin API include directory.
    • FFX_FSR2_API_INCLUDE_DIR: FSR 2 API include directory.
    • FFX_FSR2_LIB_DIR: FSR 2 link library directory.
    • FSR2_BACKEND: Set the backend. NOTE! Currently only dx11 is supported.
    • FSR2_UNITY_PLUGIN_DST_DIR: Destination directory for compiled fsr2-unity-plugin[d].dll.
  5. Add FSR2Feature into your URP renderer data.

    Add FSR2Feature
  6. Choose FidelityFX Super Resolution 2.0 as your Upscaling Filter and turn off MSAA.

    Choose FSR2
  7. Add FSR2PassControl to GameObject where it has a camera, and you want use FSR 2 to upscale the output of that camera.

    FSR2PassControl
    • Disable all the anti-aliasing methods applied to this camera.
    • Disable any post effects, e.g. Panini Projection, that cannot be used on the same camera with FSR 2. Try to use multi-cameras and put the effect on a different camera.
    • If you want FSR 2 to automatically generate reactive mask for you, you should make sure Output Reactive Mask is checked. Otherwise, you should provide your own masks with ReactiveMaskParameter.OptReactiveMaskTex and ReactiveMaskParameter.OptTransparencyAndCompositionTex.

To find out more about FSR 2, please visit our FidelityFX FSR 2 page on GPUOpen.

This plugin is developed by AMD and is distributed subject to the MIT license. For more information about the plugin, FSR, or if you have any support questions, please visit GPUOpen.

fidelityfx-fsr2-unity-urp's People

Contributors

kurbeco avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.