Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSR2 integration #53

Merged
merged 19 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ jobs:
version: 1.3.261.1
cache: true

- name: Delete MSVC tool version
shell: pwsh
# Add additional scripting steps here
run: |
cd 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build'
Get-ChildItem -Recurse *
Remove-Item * -Include 'Microsoft.VCToolsVersion.v143.default.props','Microsoft.VCToolsVersion.v143.default.txt' -Force | Out-Null
Get-ChildItem -Recurse *

- name: Setup Microsoft Visual C++ CLI
uses: ilammy/msvc-dev-cmd@v1

Expand All @@ -70,7 +79,6 @@ jobs:
shell: pwsh
# Add additional scripting steps here
run: |
Get-ChildItem -Recurse D:/a/Atlas-Engine/Atlas-Engine/VULKAN_SDK
cd ${{ github.workspace }}
${{ github.workspace }}/vcpkg/vcpkg install --clean-after-build --triplet=x64-windows
Remove-Item –path vcpkg_installed –recurse
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ data/emissivesphere.gltf
data/.cache
data/.config
data/.config
data/emissive mesh
data/flying world
data/living room
data/mis
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ if (ATLAS_TESTS)
find_package(GTest CONFIG REQUIRED)
endif()

add_subdirectory(libs/fsr2)
add_subdirectory(${ATLAS_LOCATION})

if (ATLAS_IMGUI)
Expand Down
24 changes: 24 additions & 0 deletions THIRDPARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,30 @@ volk

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.

FSR2
--------------------------------------------------------------------------------
FidelityFX Super Resolution 2.2
=================================
Copyright (c) 2022-2023 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.

nlohmann-json
--------------------------------------------------------------------------------
MIT License
Expand Down
12 changes: 6 additions & 6 deletions data/shader/deferred/geometry.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void main() {
#if (defined(OPACITY_MAP) || defined(VERTEX_COLORS))
float opacity = 1.0;
#ifdef OPACITY_MAP
opacity *= texture(opacityMap, texCoords).r;
opacity *= texture(opacityMap, texCoords, globalData.mipLodBias).r;
#endif
#ifdef VERTEX_COLORS
// opacity *= vertexColorsVS.a;
Expand All @@ -134,7 +134,7 @@ void main() {
#endif

#ifdef BASE_COLOR_MAP
vec3 textureColor = texture(baseColorMap, texCoords).rgb;
vec3 textureColor = texture(baseColorMap, texCoords, globalData.mipLodBias).rgb;
baseColorFS *= textureColor.rgb;
#endif

Expand All @@ -145,7 +145,7 @@ void main() {
vec3 geometryNormal = normalize(normalVS);

#ifdef NORMAL_MAP
vec3 normalColor = texture(normalMap, texCoords).rgb;
vec3 normalColor = texture(normalMap, texCoords, globalData.mipLodBias).rgb;
vec3 normal = mix(geometryNormal, normalize(TBN * (2.0 * normalColor - 1.0)), PushConstants.normalScale);
// We want the normal always to face the camera for two sided materials
geometryNormal *= PushConstants.twoSided > 0 ? dot(normalVS, positionVS) > 0.0 ? -1.0 : 1.0 : 1.0;
Expand All @@ -163,15 +163,15 @@ void main() {
float aoFactor = 1.0;

#ifdef ROUGHNESS_MAP
roughnessFactor *= texture(roughnessMap, texCoords).r;
roughnessFactor *= texture(roughnessMap, texCoords, globalData.mipLodBias).r;
roughnessMetalnessAoFS.r = roughnessFactor;
#endif
#ifdef METALNESS_MAP
metalnessFactor *= texture(metalnessMap, texCoords).r;
metalnessFactor *= texture(metalnessMap, texCoords, globalData.mipLodBias).r;
roughnessMetalnessAoFS.g = metalnessFactor;
#endif
#ifdef AO_MAP
aoFactor *= texture(aoMap, texCoords).r;
aoFactor *= texture(aoMap, texCoords, globalData.mipLodBias).r;
roughnessMetalnessAoFS.b = aoFactor;
#endif

Expand Down
Loading