|
| 1 | +# Snapdragon™ Game Super Resolution 2.0 Sample |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Snapdragon™ Game Super Resolution 2.0 (Snapdragon™ GSR 2.0 or SGSR 2.0) sample demonstrates how to integrate SGSR2.0 to do temporal upscaling in two or three GPU shader passes. |
| 6 | + |
| 7 | +### Variants: |
| 8 | + |
| 9 | +- **2-pass-fs (recommended)**: Uses 2 fragment shaders, favors speed, and is often optimal for Mobile and VR/XR applications. |
| 10 | +- **2-pass-cs**: Uses 2 compute shaders, favors speed, and is often optimal for Mobile and VR/XR applications. |
| 11 | +- **3-pass-cs**: Uses 3 compute shaders, favors visuals, and is often optimal for Desktop/Console and higher-end Mobile applications. |
| 12 | + |
| 13 | +## Build |
| 14 | + |
| 15 | +### Dependencies |
| 16 | + |
| 17 | +The following dependencies must be installed and the appropriate locations should be referenced in the `PATH` environment variable. |
| 18 | + |
| 19 | +* Android SDK |
| 20 | +* Andorid NDK |
| 21 | +* Gradle |
| 22 | +* CMake |
| 23 | +* Android Studio |
| 24 | + |
| 25 | +Before building any sample, run 03_BuildTools.bat at the root of the repository to ensure that all executables any sample might need are built. |
| 26 | + |
| 27 | +At this point, building this sample APK is as simple as navigating to the `build\android` folder and on a command prompt using the following gradle command: |
| 28 | + |
| 29 | +``` |
| 30 | +
|
| 31 | +$ gradlew assembleRelease |
| 32 | +
|
| 33 | +``` |
| 34 | + |
| 35 | +Building a slightly-slower executable with asserts can be done with: |
| 36 | + |
| 37 | +``` |
| 38 | +
|
| 39 | +$ gradlew assembleDebug |
| 40 | +
|
| 41 | +``` |
| 42 | + |
| 43 | + |
| 44 | +This sample can also be easily imported to Android Studio and be used within the Android Studio ecosystem -- including building, deploying, and native code debugging. |
| 45 | + |
| 46 | +To do this, open Android Studio and go to `File->New->Import Project...` and select the `build\android` folder as the source for the import. This will load the gradle configuration, at which point the sample can be used within Android Studio. |
| 47 | + |
| 48 | +### Evaluation |
| 49 | +Tapping the left part of screen switches SGSR 2-pass-fs/2-pass-cs/3-pass-cs/off. |
| 50 | +Tapping the right part of screen switches from camera move to still to compare the visual quality better. |
| 51 | + |
| 52 | + |
| 53 | +## Implementation Example |
| 54 | +The core of the integration of SGSR2.0 is |
| 55 | +``` |
| 56 | +VOID CSample::PrepareSGSR() |
| 57 | +``` |
| 58 | +and |
| 59 | +``` |
| 60 | +VOID CSample::DispatchSGSR() |
| 61 | +``` |
0 commit comments