Skip to content

Commit 52438e1

Browse files
committed
FidelityFX Variable Shading v1.0
0 parents  commit 52438e1

30 files changed

+3579
-0
lines changed

.gitlab-ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
variables:
2+
SampleName: FfxVariableShading
3+
GIT_SUBMODULE_STRATEGY: normal
4+
stages:
5+
- build
6+
- deploy
7+
build_dx12:
8+
tags:
9+
- windows
10+
- amd64
11+
stage: build
12+
script:
13+
- 'cmake -S sample -B sample/build/DX12 -G "Visual Studio 15 2017" -A x64 -DGFX_API=DX12 -DBUILD_INSTALLER=ON'
14+
- 'cmake --build sample/build/DX12 --config Release'
15+
artifacts:
16+
paths:
17+
- sample/bin/
18+
package_sample:
19+
tags:
20+
- windows
21+
- amd64
22+
stage: deploy
23+
dependencies:
24+
- build_dx12
25+
script:
26+
- echo "Packaging build"
27+
- echo cd .\sample\bin\ > %SampleName%_DX12.bat
28+
- echo start %SampleName%_DX12.exe >> %SampleName%_DX12.bat
29+
artifacts:
30+
name: "%SampleName%-%CI_COMMIT_TAG%-%CI_COMMIT_REF_NAME%-%CI_COMMIT_SHORT_SHA%"
31+
paths:
32+
- "sample/bin/"
33+
- "sample/media/"
34+
- "docs/"
35+
- "readme.md"
36+
- "license.txt"
37+
- "%SampleName%_DX12.bat"

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "sample/libs/cauldron"]
2+
path = sample/libs/cauldron
3+
url = ../../GPUOpen-LibrariesAndSDKs/Cauldron.git
4+
[submodule "sample/media/cauldron-media"]
5+
path = sample/media/cauldron-media
6+
url = ../../GPUOpen-LibrariesAndSDKs/Cauldron-Media.git

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# FidelityFX Variable Shading
2+
3+
Copyright (c) 2020 Advanced Micro Devices, Inc. All rights reserved.
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18+
THE SOFTWARE.
19+
20+
## Variable Shading
21+
22+
Variable Shading is a technique to generate image based VRS based on luminance of samples in the previous frame.
23+
The directory structure is as follows:
24+
25+
- ffx-variableshading contains the [Variable Shading library](https://github.com/GPUOpen-Effects/FidelityFX-VariableShading/tree/master/ffx-variableshading)
26+
- sample contains the [Variable Shading sample](https://github.com/GPUOpen-Effects/FidelityFX-VariableShading/tree/master/sample)
27+
28+
You can find the binaries for FidelityFX Variable Shading in the release section on GitHub.

common.cmake

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# enables multithreading compilation
3+
#
4+
5+
add_compile_options(/MP)
6+
7+
#
8+
# includes cauldron's helper cmakes
9+
#
10+
include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/cauldron/common.cmake)
11+
12+
#
13+
# Add manifest so the app uses the right DPI settings
14+
#
15+
function(addManifest PROJECT_NAME)
16+
IF (MSVC)
17+
IF (CMAKE_MAJOR_VERSION LESS 3)
18+
MESSAGE(WARNING "CMake version 3.0 or newer is required use build variable TARGET_FILE")
19+
ELSE()
20+
ADD_CUSTOM_COMMAND(
21+
TARGET ${PROJECT_NAME}
22+
POST_BUILD
23+
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\dpiawarescaling.manifest\" -inputresource:\"$<TARGET_FILE:${PROJECT_NAME}>\"\;\#1 -outputresource:\"$<TARGET_FILE:${PROJECT_NAME}>\"\;\#1
24+
COMMENT "Adding display aware manifest..."
25+
)
26+
ENDIF()
27+
ENDIF(MSVC)
28+
endfunction()
793 KB
Binary file not shown.
275 KB
Binary file not shown.

0 commit comments

Comments
 (0)