From 4a6fd451e70a8253b9351fd8dbe0a7ed59a81aeb Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Tue, 3 Jun 2025 00:36:47 -0700 Subject: [PATCH] style: precommit --- .github/workflows/build.yaml | 2 +- CMakeLists.txt | 2 +- Dockerfile | 4 +- README.md | 74 +++++------ .../Plugins/Streamline/nvngx_dlss.license.txt | 54 ++++---- .../LightLimitFix/ClusterCullingCS.hlsl | 14 +- .../SpatiotemporalBlueNoise/License.txt | 120 +++++++++--------- .../SubsurfaceScattering/SeparableSSS.hlsli | 26 ++-- include/dx12/ffx_api_dx12.h | 8 +- include/dx12/ffx_api_dx12.hpp | 2 +- include/ffx_api.h | 2 +- include/ffx_api.hpp | 2 +- include/ffx_api_loader.h | 2 +- include/ffx_api_types.h | 8 +- include/ffx_framegeneration.h | 6 +- include/ffx_framegeneration.hpp | 2 +- .../Interface/CommunityShaders/Fonts/OFL.txt | 2 +- package/Shaders/Common/FastMath.hlsli | 4 +- package/Shaders/Common/VR.hlsli | 16 +-- src/Feature.h | 2 +- src/ShaderCache.h | 40 +++--- src/State.h | 2 +- src/Utils/Format.h | 8 +- src/Utils/Game.h | 10 +- src/Utils/GameSetting.h | 38 +++--- 25 files changed, 225 insertions(+), 225 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8940b6ae39..11c416153e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -122,7 +122,7 @@ jobs: # Generate commit-based release notes if NOTES=$(gh api repos/$REPO/compare/$BASE_SHA...$HEAD_SHA 2>/dev/null | jq -r --arg author "$PR_AUTHOR" ' - .commits[] + .commits[] | "- \(.commit.message | split("\n")[0]) by @\(.author.login // $author)" ' 2>/dev/null) && [[ -n "$NOTES" ]]; then echo "$NOTES" > release-notes.md diff --git a/CMakeLists.txt b/CMakeLists.txt index f0e9e2de64..c89121fd27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,7 +216,7 @@ if(AUTO_PLUGIN_DEPLOYMENT) copy_shaders.stamp ${DEPLOY_TARGET_HASHES} ) - + if(NOT DEFINED ENV{CommunityShadersOutputDir}) message("When using AUTO_PLUGIN_DEPLOYMENT option, you need to set environment variable 'CommunityShadersOutputDir'") endif() diff --git a/Dockerfile b/Dockerfile index 35390e27db..d4417bb244 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,11 +19,11 @@ RUN \ --remove Microsoft.VisualStudio.Component.Windows81SDK \ || IF "%ERRORLEVEL%"=="3010" EXIT 0) \ && del /q vs_buildtools.exe - + RUN git clone https://github.com/microsoft/vcpkg.git C:/vcpkg && \ cd C:/vcpkg && \ bootstrap-vcpkg.bat - + RUN setx /M VCPKG_ROOT "C:/vcpkg" && mkdir C:\skyrim-community-shaders WORKDIR C:/skyrim-community-shaders diff --git a/README.md b/README.md index 8cd8b1cd5c..ff48483962 100644 --- a/README.md +++ b/README.md @@ -17,31 +17,31 @@ SKSE core plugin for community-driven advanced graphics modifications. ## Requirements -- Any terminal of your choice (e.g., PowerShell) -- [Visual Studio Community 2022](https://visualstudio.microsoft.com/) - - Desktop development with C++ -- [CMake](https://cmake.org/) - - Edit the `PATH` environment variable and add the cmake.exe install path as a new value - - Instructions for finding and editing the `PATH` environment variable can be found [here](https://www.java.com/en/download/help/path.html) -- [Git](https://git-scm.com/downloads) - - Edit the `PATH` environment variable and add the Git.exe install path as a new value -- [Vcpkg](https://github.com/microsoft/vcpkg) - - Install vcpkg using the directions in vcpkg's [Quick Start Guide](https://github.com/microsoft/vcpkg#quick-start-windows) - - After install, add a new environment variable named `VCPKG_ROOT` with the value as the path to the folder containing vcpkg - - Make sure your local vcpkg repo matches the commit id specified in `builtin-baseline` in `vcpkg.json` otherwise you might get another version of a non pinned vcpkg dependency causing undefined behaviour +- Any terminal of your choice (e.g., PowerShell) +- [Visual Studio Community 2022](https://visualstudio.microsoft.com/) + - Desktop development with C++ +- [CMake](https://cmake.org/) + - Edit the `PATH` environment variable and add the cmake.exe install path as a new value + - Instructions for finding and editing the `PATH` environment variable can be found [here](https://www.java.com/en/download/help/path.html) +- [Git](https://git-scm.com/downloads) + - Edit the `PATH` environment variable and add the Git.exe install path as a new value +- [Vcpkg](https://github.com/microsoft/vcpkg) + - Install vcpkg using the directions in vcpkg's [Quick Start Guide](https://github.com/microsoft/vcpkg#quick-start-windows) + - After install, add a new environment variable named `VCPKG_ROOT` with the value as the path to the folder containing vcpkg + - Make sure your local vcpkg repo matches the commit id specified in `builtin-baseline` in `vcpkg.json` otherwise you might get another version of a non pinned vcpkg dependency causing undefined behaviour ## User Requirements -- [Address Library for SKSE](https://www.nexusmods.com/skyrimspecialedition/mods/32444) - - Needed for SSE/AE -- [VR Address Library for SKSEVR](https://www.nexusmods.com/skyrimspecialedition/mods/58101) - - Needed for VR +- [Address Library for SKSE](https://www.nexusmods.com/skyrimspecialedition/mods/32444) + - Needed for SSE/AE +- [VR Address Library for SKSEVR](https://www.nexusmods.com/skyrimspecialedition/mods/58101) + - Needed for VR ## Register Visual Studio as a Generator -- Open `x64 Native Tools Command Prompt` -- Run `cmake` -- Close the cmd window +- Open `x64 Native Tools Command Prompt` +- Run `cmake` +- Close the cmd window Or, in powershell run: @@ -65,27 +65,27 @@ If you want an example CMakeUserPreset to start off with you can copy the `CMake #### AUTO_PLUGIN_DEPLOYMENT -- This option is default `"OFF"` -- Make sure `"AUTO_PLUGIN_DEPLOYMENT"` is set to `"ON"` in `CMakeUserPresets.json` -- Change the `"CommunityShadersOutputDir"` value to match your desired outputs, if you want multiple folders you can separate them by `;` is shown in the template example +- This option is default `"OFF"` +- Make sure `"AUTO_PLUGIN_DEPLOYMENT"` is set to `"ON"` in `CMakeUserPresets.json` +- Change the `"CommunityShadersOutputDir"` value to match your desired outputs, if you want multiple folders you can separate them by `;` is shown in the template example #### AIO_ZIP_TO_DIST -- This option is default `"ON"` -- Make sure `"AIO_ZIP_TO_DIST"` is set to `"ON"` in `CMakeUserPresets.json` -- This will create a `CommunityShaders_AIO.7z` archive in /dist containing all features and base mod +- This option is default `"ON"` +- Make sure `"AIO_ZIP_TO_DIST"` is set to `"ON"` in `CMakeUserPresets.json` +- This will create a `CommunityShaders_AIO.7z` archive in /dist containing all features and base mod #### ZIP_TO_DIST -- This option is default `"ON"` -- Make sure `"ZIP_TO_DIST"` is set to `"ON"` in `CMakeUserPresets.json` -- This will create a zip for each feature and one for the base Community shaders in /dist -- If having a file with name `CORE` in the root of the features folder it will instead be merged into the core zip +- This option is default `"ON"` +- Make sure `"ZIP_TO_DIST"` is set to `"ON"` in `CMakeUserPresets.json` +- This will create a zip for each feature and one for the base Community shaders in /dist +- If having a file with name `CORE` in the root of the features folder it will instead be merged into the core zip #### TRACY_SUPPORT -- This option is default `"OFF"` -- This will enable tracy support, might need to delete build folder when this option is changed +- This option is default `"OFF"` +- This will enable tracy support, might need to delete build folder when this option is changed When using custom preset you can call BuildRelease.bat with an parameter to specify which preset to configure eg: `.\BuildRelease.bat ALL-WITH-AUTO-DEPLOYMENT` @@ -128,17 +128,17 @@ docker run -it --rm --isolation=process -v .:C:/skyrim-community-shaders skyrim- [GPL-3.0-or-later](COPYING) WITH [Modding Exception AND GPL-3.0 Linking Exception (with Corresponding Source)](EXCEPTIONS.md). Specifically, the Modded Code includes: -- Skyrim (and its variants) -- Hardware drivers to enable additional functionality provided via proprietary SDKs, such as [Nvidia DLSS](https://developer.nvidia.com/rtx/dlss/get-started), [AMD FidelityFX FSR3](https://gpuopen.com/fidelityfx-super-resolution-3/), and [Intel XeSS](https://github.com/intel/xess) +- Skyrim (and its variants) +- Hardware drivers to enable additional functionality provided via proprietary SDKs, such as [Nvidia DLSS](https://developer.nvidia.com/rtx/dlss/get-started), [AMD FidelityFX FSR3](https://gpuopen.com/fidelityfx-super-resolution-3/), and [Intel XeSS](https://github.com/intel/xess) The Modding Libraries include: -- [SKSE](https://skse.silverlock.org/) -- Commonlib (and variants). +- [SKSE](https://skse.silverlock.org/) +- Commonlib (and variants). ### Shaders See LICENSE within each directory; if none, it's [Default](#default) -- [Features Shaders](features) -- [Package Shaders](package/Shaders/) +- [Features Shaders](features) +- [Package Shaders](package/Shaders/) diff --git a/features/Frame Generation/SKSE/Plugins/Streamline/nvngx_dlss.license.txt b/features/Frame Generation/SKSE/Plugins/Streamline/nvngx_dlss.license.txt index 94965d731e..75487ca37a 100644 --- a/features/Frame Generation/SKSE/Plugins/Streamline/nvngx_dlss.license.txt +++ b/features/Frame Generation/SKSE/Plugins/Streamline/nvngx_dlss.license.txt @@ -11,7 +11,7 @@ license on behalf of a company or other legal entity, you represent that you have legal authority and "you" will mean the entity you represent. By using the SDK, you affirm that you have reached the legal age of majority, you accept the terms of this license, and you take legal and financial responsibility for the -actions of your permitted users. +actions of your permitted users. You agree to use the SDK only for purposes that are permitted by (a) this license, and (b) any applicable law, regulation or generally accepted practices @@ -20,7 +20,7 @@ or guidelines in the relevant jurisdictions. 1. LICENSE. Subject to the terms of this license and the terms in the supplement attached, NVIDIA hereby grants you a non-exclusive, non-transferable license, without the right to sublicense (except as expressly provided in this license) -to: +to: (a) Install and use the SDK, @@ -36,34 +36,34 @@ this license. exercise the grants above: (a) An application must have material additional functionality, beyond the -included portions of the SDK. +included portions of the SDK. (b) The following notice shall be included in modifications and derivative works of source code distributed: "This software contains source code provided by -NVIDIA Corporation." +NVIDIA Corporation." (c) You agree to distribute the SDK subject to the terms at least as protective as the terms of this license, including (without limitation) terms relating to the license grant, license restrictions and protection of NVIDIA's intellectual property rights. Additionally, you agree that you will protect the privacy, -security and legal rights of your application users. +security and legal rights of your application users. (d) You agree to notify NVIDIA in writing of any known or suspected distribution or use of the SDK not in compliance with the requirements of this license, and to enforce the terms of your agreements with respect to the distributed portions -of the SDK. +of the SDK. 3. AUTHORIZED USERS. You may allow employees and contractors of your entity or of your subsidiary(ies) to access and use the SDK from your secure network to perform work on your behalf. If you are an academic institution you may allow users enrolled or employed by the academic institution to access and use the SDK from your secure network. You are responsible for the compliance with the terms -of this license by your authorized users. +of this license by your authorized users. 4. LIMITATIONS. Your license to use the SDK is restricted as follows: (a) You may not reverse engineer, decompile or disassemble, or remove copyright -or other proprietary notices from any portion of the SDK or copies of the SDK. +or other proprietary notices from any portion of the SDK or copies of the SDK. (b) Except as expressly provided in this license, you may not copy, sell, rent, sublicense, transfer, distribute, modify, or create derivative works of any @@ -76,7 +76,7 @@ NVIDIA. (d) You may not bypass, disable, or circumvent any technical limitation, encryption, security, digital rights management or authentication mechanism in -the SDK. +the SDK. (e) You may not use the SDK in any manner that would cause it to become subject to an open source software license. As examples, licenses that require as a @@ -91,7 +91,7 @@ death, or catastrophic loss. Examples include use in avionics, navigation, military, medical, life support or other life critical applications. NVIDIA does not design, test or manufacture the SDK for these critical uses and NVIDIA shall not be liable to you or any third party, in whole or in part, for any claims or -damages arising from such uses. +damages arising from such uses. (g) You agree to defend, indemnify and hold harmless NVIDIA and its affiliates, and their respective employees, contractors, agents, officers and directors, @@ -99,7 +99,7 @@ from and against any and all claims, damages, obligations, losses, liabilities, costs or debt, fines, restitutions and expenses (including but not limited to attorney's fees and costs incident to establishing the right of indemnification) arising out of or related to your use of the SDK outside of the scope of this -license, or not in compliance with its terms. +license, or not in compliance with its terms. 5. UPDATES. NVIDIA may, at its option, make available patches, workarounds or other updates to this SDK. Unless the updates are provided with their separate @@ -124,9 +124,9 @@ without liability. separate legal notices or terms as may be described in proprietary notices accompanying the SDK. If and to the extent there is a conflict between the terms in this license and the third-party license terms, the third-party terms control -only to the extent necessary to resolve the conflict. +only to the extent necessary to resolve the conflict. -8. OWNERSHIP. +8. OWNERSHIP. 8.1 NVIDIA reserves all rights, title and interest in and to the SDK not expressly granted to you under this license. NVIDIA and its suppliers hold all @@ -137,8 +137,8 @@ of the United States and other countries, and international treaty provisions. 8.2 Subject to the rights of NVIDIA and its suppliers in the SDK, you hold all rights, title and interest in and to your applications and your derivative works of the sample source code delivered in the SDK including their respective -intellectual property rights. - +intellectual property rights. + 9. FEEDBACK. You may, but are not obligated to, provide Feedback to NVIDIA. "Feedback" means all suggestions, fixes, modifications, feature requests or other feedback regarding the SDK. Feedback, even if designated as confidential @@ -155,7 +155,7 @@ ANY KIND OR NATURE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. NVIDIA DOES NOT WARRANT THAT THE SDK WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION THEREOF WILL BE UNINTERRUPTED OR ERROR-FREE, -OR THAT ALL ERRORS WILL BE CORRECTED. +OR THAT ALL ERRORS WILL BE CORRECTED. 11. LIMITATIONS OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NVIDIA AND ITS AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, @@ -169,7 +169,7 @@ HAS PREVIOUSLY BEEN ADVISED OF, OR COULD REASONABLY HAVE FORESEEN, THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL NVIDIA'S AND ITS AFFILIATES TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS LICENSE EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR -EXTEND THIS LIMIT. +EXTEND THIS LIMIT. 12. TERMINATION. Your rights under this license will terminate automatically without notice from NVIDIA if you fail to comply with any term and condition of @@ -181,7 +181,7 @@ commercially viable. Upon any termination of this license, you agree to promptly discontinue use of the SDK and destroy all copies in your possession or control. Your prior distributions in accordance with this license are not affected by the termination of this license. All provisions of this license will survive -termination, except for the license granted to you. +termination, except for the license granted to you. 13. APPLICABLE LAW. This license will be governed in all respects by the laws of the United States and of the State of Delaware, without regard to the conflicts @@ -191,14 +191,14 @@ of this license in the English language. The state or federal courts residing in Santa Clara County, California shall have exclusive jurisdiction over any dispute or claim arising out of this license. Notwithstanding this, you agree that NVIDIA shall still be allowed to apply for injunctive remedies or urgent -legal relief in any jurisdiction. +legal relief in any jurisdiction. 14. NO ASSIGNMENT. This license and your rights and obligations thereunder may not be assigned by you by any means or operation of law without NVIDIA's permission. Any attempted assignment not approved by NVIDIA in writing shall be void and of no effect. NVIDIA may assign, delegate or transfer this license and its rights and obligations, and if to a non-affiliate you will be notified. - + 15. EXPORT. The SDK is subject to United States export laws and regulations. You agree to comply with all applicable U.S. and international export laws, including the Export Administration Regulations (EAR) administered by the U.S. @@ -217,7 +217,7 @@ CFR §§ 227.7202 & 252.227-7014(a)(1). Use, duplication or disclosure by the U. Government or a U.S. Government subcontractor is subject to the restrictions in this license pursuant to 48 CFR § 12.212 or 48 CFR § 227.7202. In no event shall the US Government user acquire rights in the SDK beyond those specified in 48 -C.F.R. 52.227-19(b)(1)-(2). +C.F.R. 52.227-19(b)(1)-(2). 17. NOTICES. You agree that any notices that NVIDIA sends you electronically, such as via email, will satisfy any legal communication requirements. Please @@ -254,7 +254,7 @@ but not defined below have the meaning assigned to them in the Agreement. This supplement is an exhibit to the Agreement and is incorporated as an integral part of the Agreement. In the event of conflict between the terms in this supplement and the terms in the Agreement, the terms in this supplement -govern. +govern. 1. Interoperability. Your applications that incorporate, or are based on, the SDK must be fully interoperable with compatible GPU hardware products designed @@ -268,7 +268,7 @@ use of such SDKs or their functionality is outside of the scope of the Agreement. For the purpose of this section, cloud services include application service providers or service bureaus, operators of hosted/virtual system environments, or hosting, time sharing or providing any other type of service to -others. +others. 3. Notification for the DLSS SDK and NGX SDK. You are required to notify NVIDIA prior to commercial release of an application (including a plug-in to a @@ -276,7 +276,7 @@ commercial application) that incorporates, or is based on, the DLSS SDK or NGX SDK. Please send notifications to: https://developer.nvidia.com/sw-notification and provide the following information in the email: company name, publisher and developer name, NVIDIA SDK used, application name, platform (i.e. PC, Linux), -scheduled ship date, and weblink to product/video. +scheduled ship date, and weblink to product/video. 4. Audio and Video Encoders and Decoders. You acknowledge and agree that it is your sole responsibility to obtain any additional third-party licenses required @@ -286,7 +286,7 @@ content relating to audio and/or video encoders and decoders from, including but not limited to, Microsoft, Thomson, Fraunhofer IIS, Sisvel S.p.A., MPEG-LA, and Coding Technologies. NVIDIA does not grant to you under this Agreement any necessary patent or other rights with respect to any audio and/or video encoders -and decoders. +and decoders. 5. DLSS SDK Terms. By installing or using the DLSS SDK you agree that NVIDIA can make over-the-air updates of DLSS in systems that have DLSS installed, including @@ -309,9 +309,9 @@ collateral, trade-show displays and other retail packaging materials, as the supplier of the DLSS SDK or NGX SDK for the applications that were developed with use of such SDKs, provided that all such references to NVIDIA will be subject to NVIDIA's prior review and written approval, which will not be -unreasonably withheld or delayed. +unreasonably withheld or delayed. -(b) NVIDIA Trademark Placement in Applications with the DLSS SDK or NGX SDK. +(b) NVIDIA Trademark Placement in Applications with the DLSS SDK or NGX SDK. For applications that incorporate the DLSS SDK or NGX SDK or portions thereof, you must attribute the use of the applicable SDK and include the NVIDIA Marks on splash screens, in the about box of the application (if present), and in diff --git a/features/Light Limit Fix/Shaders/LightLimitFix/ClusterCullingCS.hlsl b/features/Light Limit Fix/Shaders/LightLimitFix/ClusterCullingCS.hlsl index 2414f44414..1ddde0bd81 100644 --- a/features/Light Limit Fix/Shaders/LightLimitFix/ClusterCullingCS.hlsl +++ b/features/Light Limit Fix/Shaders/LightLimitFix/ClusterCullingCS.hlsl @@ -95,22 +95,22 @@ function CullLights( L, C, G, I ) Input: A list I of global light index list. Output: A 2D grid G with the current tiles offset and light count. Output: A list I with the current tiles overlapping light indices appended to it. - + 1. let t be the index of the current tile ; t is the 2D index of the tile. 2. let i be a local light index list ; i is a local light index list. 3. let f <- Frustum(t) ; f is the frustum for the current tile. - + 4. for l in L ; Iterate the lights in the light list. 5. if Cull( l, f ) ; Cull the light against the tile frustum. 6. AppendLight( l, i ) ; Append the light to the local light index list. - -7. c <- AtomicInc( C, i.count ) ; Atomically increment the current index of the + +7. c <- AtomicInc( C, i.count ) ; Atomically increment the current index of the ; global light index list by the number of lights ; overlapping the current tile and store the ; original index in c. - + 8. G(t) <- ( c, i.count ) ; Store the offset and light count in the light grid. - -9. I(c) <- i ; Store the local light index list into the global + +9. I(c) <- i ; Store the local light index list into the global ; light index list. */ \ No newline at end of file diff --git a/features/Skylighting/Shaders/Skylighting/SpatiotemporalBlueNoise/License.txt b/features/Skylighting/Shaders/Skylighting/SpatiotemporalBlueNoise/License.txt index ada044195d..58de91aa68 100644 --- a/features/Skylighting/Shaders/Skylighting/SpatiotemporalBlueNoise/License.txt +++ b/features/Skylighting/Shaders/Skylighting/SpatiotemporalBlueNoise/License.txt @@ -5,66 +5,66 @@ NVIDIA Source Code License for Spatiotemporal Blue Noise Texture Generation “Licensor” means any person or entity that distributes its Work. “Software” means the original work of authorship made available under this License. -“Work” means the Software and any additions to or derivative works of the Software that are made available +“Work” means the Software and any additions to or derivative works of the Software that are made available under this License. -The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided -under U.S. copyright law; provided, however, that for the purposes of this License, derivative works shall not +The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided +under U.S. copyright law; provided, however, that for the purposes of this License, derivative works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work. -Works, including the Software, are “made available” under this License by including in or with the Work -either (a) a copyright notice referencing the applicability of this License to the Work, or (b) a copy of this +Works, including the Software, are “made available” under this License by including in or with the Work +either (a) a copyright notice referencing the applicability of this License to the Work, or (b) a copy of this License. 2. License Grant -2.1 Copyright Grant. Subject to the terms and conditions of this License, each Licensor grants to you a -perpetual, worldwide, non-exclusive, royalty-free, copyright license to reproduce, prepare derivative -works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting +2.1 Copyright Grant. Subject to the terms and conditions of this License, each Licensor grants to you a +perpetual, worldwide, non-exclusive, royalty-free, copyright license to reproduce, prepare derivative +works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form. 3. Limitations -3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this License, -(b) you include a complete copy of this License with your distribution, and (c) you retain without +3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this License, +(b) you include a complete copy of this License with your distribution, and (c) you retain without modification any copyright, patent, trademark, or attribution notices that are present in the Work. -3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, -and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide -that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific -derivative works that are subject to Your Terms. Notwithstanding Your Terms, this License (including +3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, +and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide +that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific +derivative works that are subject to Your Terms. Notwithstanding Your Terms, this License (including the redistribution requirements in Section 3.1) will continue to apply to the Work itself. -3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use -non-commercially. Notwithstanding the foregoing, NVIDIA and its affiliates may use the Work and -any derivative works commercially. As used herein, “non-commercially” means for research or +3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use +non-commercially. Notwithstanding the foregoing, NVIDIA and its affiliates may use the Work and +any derivative works commercially. As used herein, “non-commercially” means for research or evaluation purposes only. -3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any -claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by -any Work, then your rights under this License from such Licensor (including the grant in Section 2.1) +3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any +claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by +any Work, then your rights under this License from such Licensor (including the grant in Section 2.1) will terminate immediately. -3.5 Trademarks. This License does not grant any rights to use any Licensor’s or its affiliates’ names, +3.5 Trademarks. This License does not grant any rights to use any Licensor’s or its affiliates’ names, logos, or trademarks, except as necessary to reproduce the notices described in this License. -3.6 Termination. If you violate any term of this License, then your rights under this License (including +3.6 Termination. If you violate any term of this License, then your rights under this License (including the grant in Section 2.1) will terminate immediately. 4. Disclaimer of Warranty. -THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. -YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE. +THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. +YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE. 5. Limitation of Liability. -EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL -THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL -ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO -THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO -LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER -FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF +EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL +THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL +ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO +THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO +LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER +FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. @@ -83,7 +83,7 @@ license on behalf of a company or other legal entity, you represent that you have legal authority and "you" will mean the entity you represent. By using the SDK, you affirm that you have reached the legal age of majority, you accept the terms of this license, and you take legal and financial responsibility for the -actions of your permitted users. +actions of your permitted users. You agree to use the SDK only for purposes that are permitted by (a) this license, and (b) any applicable law, regulation or generally accepted practices @@ -92,7 +92,7 @@ or guidelines in the relevant jurisdictions. 1. LICENSE. Subject to the terms of this license and the terms in the supplement attached, NVIDIA hereby grants you a non-exclusive, non-transferable license, without the right to sublicense (except as expressly provided in this license) -to: +to: (a) Install and use the SDK, @@ -108,34 +108,34 @@ this license. exercise the grants above: (a) An application must have material additional functionality, beyond the -included portions of the SDK. +included portions of the SDK. (b) The following notice shall be included in modifications and derivative works of source code distributed: "This software contains source code provided by -NVIDIA Corporation." +NVIDIA Corporation." (c) You agree to distribute the SDK subject to the terms at least as protective as the terms of this license, including (without limitation) terms relating to the license grant, license restrictions and protection of NVIDIA's intellectual property rights. Additionally, you agree that you will protect the privacy, -security and legal rights of your application users. +security and legal rights of your application users. (d) You agree to notify NVIDIA in writing of any known or suspected distribution or use of the SDK not in compliance with the requirements of this license, and to enforce the terms of your agreements with respect to the distributed portions -of the SDK. +of the SDK. 3. AUTHORIZED USERS. You may allow employees and contractors of your entity or of your subsidiary(ies) to access and use the SDK from your secure network to perform work on your behalf. If you are an academic institution you may allow users enrolled or employed by the academic institution to access and use the SDK from your secure network. You are responsible for the compliance with the terms -of this license by your authorized users. +of this license by your authorized users. 4. LIMITATIONS. Your license to use the SDK is restricted as follows: (a) You may not reverse engineer, decompile or disassemble, or remove copyright -or other proprietary notices from any portion of the SDK or copies of the SDK. +or other proprietary notices from any portion of the SDK or copies of the SDK. (b) Except as expressly provided in this license, you may not copy, sell, rent, sublicense, transfer, distribute, modify, or create derivative works of any @@ -148,7 +148,7 @@ NVIDIA. (d) You may not bypass, disable, or circumvent any technical limitation, encryption, security, digital rights management or authentication mechanism in -the SDK. +the SDK. (e) You may not use the SDK in any manner that would cause it to become subject to an open source software license. As examples, licenses that require as a @@ -163,7 +163,7 @@ death, or catastrophic loss. Examples include use in avionics, navigation, military, medical, life support or other life critical applications. NVIDIA does not design, test or manufacture the SDK for these critical uses and NVIDIA shall not be liable to you or any third party, in whole or in part, for any claims or -damages arising from such uses. +damages arising from such uses. (g) You agree to defend, indemnify and hold harmless NVIDIA and its affiliates, and their respective employees, contractors, agents, officers and directors, @@ -171,7 +171,7 @@ from and against any and all claims, damages, obligations, losses, liabilities, costs or debt, fines, restitutions and expenses (including but not limited to attorney's fees and costs incident to establishing the right of indemnification) arising out of or related to your use of the SDK outside of the scope of this -license, or not in compliance with its terms. +license, or not in compliance with its terms. 5. UPDATES. NVIDIA may, at its option, make available patches, workarounds or other updates to this SDK. Unless the updates are provided with their separate @@ -196,9 +196,9 @@ without liability. separate legal notices or terms as may be described in proprietary notices accompanying the SDK. If and to the extent there is a conflict between the terms in this license and the third-party license terms, the third-party terms control -only to the extent necessary to resolve the conflict. +only to the extent necessary to resolve the conflict. -8. OWNERSHIP. +8. OWNERSHIP. 8.1 NVIDIA reserves all rights, title and interest in and to the SDK not expressly granted to you under this license. NVIDIA and its suppliers hold all @@ -209,8 +209,8 @@ of the United States and other countries, and international treaty provisions. 8.2 Subject to the rights of NVIDIA and its suppliers in the SDK, you hold all rights, title and interest in and to your applications and your derivative works of the sample source code delivered in the SDK including their respective -intellectual property rights. - +intellectual property rights. + 9. FEEDBACK. You may, but are not obligated to, provide Feedback to NVIDIA. "Feedback" means all suggestions, fixes, modifications, feature requests or other feedback regarding the SDK. Feedback, even if designated as confidential @@ -227,7 +227,7 @@ ANY KIND OR NATURE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. NVIDIA DOES NOT WARRANT THAT THE SDK WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION THEREOF WILL BE UNINTERRUPTED OR ERROR-FREE, -OR THAT ALL ERRORS WILL BE CORRECTED. +OR THAT ALL ERRORS WILL BE CORRECTED. 11. LIMITATIONS OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NVIDIA AND ITS AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, @@ -241,7 +241,7 @@ HAS PREVIOUSLY BEEN ADVISED OF, OR COULD REASONABLY HAVE FORESEEN, THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL NVIDIA'S AND ITS AFFILIATES TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS LICENSE EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR -EXTEND THIS LIMIT. +EXTEND THIS LIMIT. 12. TERMINATION. Your rights under this license will terminate automatically without notice from NVIDIA if you fail to comply with any term and condition of @@ -253,7 +253,7 @@ commercially viable. Upon any termination of this license, you agree to promptly discontinue use of the SDK and destroy all copies in your possession or control. Your prior distributions in accordance with this license are not affected by the termination of this license. All provisions of this license will survive -termination, except for the license granted to you. +termination, except for the license granted to you. 13. APPLICABLE LAW. This license will be governed in all respects by the laws of the United States and of the State of Delaware, without regard to the conflicts @@ -263,14 +263,14 @@ of this license in the English language. The state or federal courts residing in Santa Clara County, California shall have exclusive jurisdiction over any dispute or claim arising out of this license. Notwithstanding this, you agree that NVIDIA shall still be allowed to apply for injunctive remedies or urgent -legal relief in any jurisdiction. +legal relief in any jurisdiction. 14. NO ASSIGNMENT. This license and your rights and obligations thereunder may not be assigned by you by any means or operation of law without NVIDIA's permission. Any attempted assignment not approved by NVIDIA in writing shall be void and of no effect. NVIDIA may assign, delegate or transfer this license and its rights and obligations, and if to a non-affiliate you will be notified. - + 15. EXPORT. The SDK is subject to United States export laws and regulations. You agree to comply with all applicable U.S. and international export laws, including the Export Administration Regulations (EAR) administered by the U.S. @@ -289,7 +289,7 @@ CFR §§ 227.7202 & 252.227-7014(a)(1). Use, duplication or disclosure by the U. Government or a U.S. Government subcontractor is subject to the restrictions in this license pursuant to 48 CFR § 12.212 or 48 CFR § 227.7202. In no event shall the US Government user acquire rights in the SDK beyond those specified in 48 -C.F.R. 52.227-19(b)(1)-(2). +C.F.R. 52.227-19(b)(1)-(2). 17. NOTICES. You agree that any notices that NVIDIA sends you electronically, such as via email, will satisfy any legal communication requirements. Please @@ -326,7 +326,7 @@ but not defined below have the meaning assigned to them in the Agreement. This supplement is an exhibit to the Agreement and is incorporated as an integral part of the Agreement. In the event of conflict between the terms in this supplement and the terms in the Agreement, the terms in this supplement -govern. +govern. 1. Interoperability. Your applications that incorporate, or are based on, the SDK must be fully interoperable with compatible GPU hardware products designed @@ -340,7 +340,7 @@ use of such SDKs or their functionality is outside of the scope of the Agreement. For the purpose of this section, cloud services include application service providers or service bureaus, operators of hosted/virtual system environments, or hosting, time sharing or providing any other type of service to -others. +others. 3. Notification for the DLSS SDK and NGX SDK. You are required to notify NVIDIA prior to commercial release of an application (including a plug-in to a @@ -348,7 +348,7 @@ commercial application) that incorporates, or is based on, the DLSS SDK or NGX SDK. Please send notifications to: https://developer.nvidia.com/sw-notification and provide the following information in the email: company name, publisher and developer name, NVIDIA SDK used, application name, platform (i.e. PC, Linux), -scheduled ship date, and weblink to product/video. +scheduled ship date, and weblink to product/video. 4. Audio and Video Encoders and Decoders. You acknowledge and agree that it is your sole responsibility to obtain any additional third-party licenses required @@ -358,7 +358,7 @@ content relating to audio and/or video encoders and decoders from, including but not limited to, Microsoft, Thomson, Fraunhofer IIS, Sisvel S.p.A., MPEG-LA, and Coding Technologies. NVIDIA does not grant to you under this Agreement any necessary patent or other rights with respect to any audio and/or video encoders -and decoders. +and decoders. 5. DLSS SDK Terms. By installing or using the DLSS SDK you agree that NVIDIA can make over-the-air updates of DLSS in systems that have DLSS installed, including @@ -381,9 +381,9 @@ collateral, trade-show displays and other retail packaging materials, as the supplier of the DLSS SDK or NGX SDK for the applications that were developed with use of such SDKs, provided that all such references to NVIDIA will be subject to NVIDIA's prior review and written approval, which will not be -unreasonably withheld or delayed. +unreasonably withheld or delayed. -(b) NVIDIA Trademark Placement in Applications with the DLSS SDK or NGX SDK. +(b) NVIDIA Trademark Placement in Applications with the DLSS SDK or NGX SDK. For applications that incorporate the DLSS SDK or NGX SDK or portions thereof, you must attribute the use of the applicable SDK and include the NVIDIA Marks on splash screens, in the about box of the application (if present), and in diff --git a/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSS.hlsli b/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSS.hlsli index 1cc34b1b92..c55aef7435 100644 --- a/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSS.hlsli +++ b/features/Subsurface Scattering/Shaders/SubsurfaceScattering/SeparableSSS.hlsli @@ -5,30 +5,30 @@ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the following disclaimer - * in the documentation and/or other materials provided with the + * in the documentation and/or other materials provided with the * distribution: * * "Uses Separable SSS. Copyright (C) 2012 by Jorge Jimenez and Diego * Gutierrez." * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS - * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS + * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * The views and conclusions contained in the software and documentation are + * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the copyright holders. */ diff --git a/include/dx12/ffx_api_dx12.h b/include/dx12/ffx_api_dx12.h index fd174ec862..b459fde3fa 100644 --- a/include/dx12/ffx_api_dx12.h +++ b/include/dx12/ffx_api_dx12.h @@ -1,7 +1,7 @@ // This file is part of the FidelityFX SDK. // // Copyright (C) 2024 Advanced Micro Devices, Inc. -// +// // 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 @@ -171,7 +171,7 @@ static inline uint32_t ffxApiGetSurfaceFormatDX12(DXGI_FORMAT format) case DXGI_FORMAT_R10G10B10A2_UNORM: return FFX_API_SURFACE_FORMAT_R10G10B10A2_UNORM; //case DXGI_FORMAT_R10G10B10A2_UINT: - + case DXGI_FORMAT_R11G11B10_FLOAT: return FFX_API_SURFACE_FORMAT_R11G11B10_FLOAT; @@ -200,7 +200,7 @@ static inline uint32_t ffxApiGetSurfaceFormatDX12(DXGI_FORMAT format) case DXGI_FORMAT_R16G16_UINT: return FFX_API_SURFACE_FORMAT_R16G16_UINT; //case DXGI_FORMAT_R16G16_SNORM - //case DXGI_FORMAT_R16G16_SINT + //case DXGI_FORMAT_R16G16_SINT //case DXGI_FORMAT_R32_SINT: case DXGI_FORMAT_R32_UINT: @@ -287,7 +287,7 @@ static inline FfxApiResource ffxApiGetResourceDX12(ID3D12Resource* pRes, uint32_ if (desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS) res.description.usage |= FFX_API_RESOURCE_USAGE_UAV; - + res.description.width = static_cast(desc.Width); res.description.height = static_cast(desc.Height); res.description.depth = static_cast(desc.DepthOrArraySize); diff --git a/include/dx12/ffx_api_dx12.hpp b/include/dx12/ffx_api_dx12.hpp index b33c5c511b..86cd10ff32 100644 --- a/include/dx12/ffx_api_dx12.hpp +++ b/include/dx12/ffx_api_dx12.hpp @@ -1,7 +1,7 @@ // This file is part of the FidelityFX SDK. // // Copyright (C) 2024 Advanced Micro Devices, Inc. -// +// // 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 diff --git a/include/ffx_api.h b/include/ffx_api.h index 0b192d58cb..4bcefc9247 100644 --- a/include/ffx_api.h +++ b/include/ffx_api.h @@ -1,7 +1,7 @@ // This file is part of the FidelityFX SDK. // // Copyright (C) 2024 Advanced Micro Devices, Inc. -// +// // 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 diff --git a/include/ffx_api.hpp b/include/ffx_api.hpp index 7d0bbfb68c..0dc09f920f 100644 --- a/include/ffx_api.hpp +++ b/include/ffx_api.hpp @@ -1,7 +1,7 @@ // This file is part of the FidelityFX SDK. // // Copyright (C) 2024 Advanced Micro Devices, Inc. -// +// // 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 diff --git a/include/ffx_api_loader.h b/include/ffx_api_loader.h index 9df9ac32b8..7db0f9031f 100644 --- a/include/ffx_api_loader.h +++ b/include/ffx_api_loader.h @@ -1,7 +1,7 @@ // This file is part of the FidelityFX SDK. // // Copyright (C) 2024 Advanced Micro Devices, Inc. -// +// // 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 diff --git a/include/ffx_api_types.h b/include/ffx_api_types.h index a31b81fe31..01ab3d08dc 100644 --- a/include/ffx_api_types.h +++ b/include/ffx_api_types.h @@ -1,7 +1,7 @@ // This file is part of the FidelityFX SDK. // // Copyright (C) 2024 Advanced Micro Devices, Inc. -// +// // 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 @@ -195,7 +195,7 @@ typedef struct FfxApiEffectMemoryUsage /* Tuning varianceFactor and safetyMarginInMs Tips: -Calculation of frame pacing algorithm's next target timestamp: +Calculation of frame pacing algorithm's next target timestamp: target frametime delta = average Frametime - (variance * varianceFactor) - safetyMarginInMs Default Tuning uses safetyMarginInMs==0.1ms and varianceFactor==0.1. @@ -203,9 +203,9 @@ Say Tuning set A uses safetyMarginInMs==0.75ms, and varianceFactor==0.1. Say Tuning Set B uses safetyMarginInMs==0.01ms and varianceFactor==0.3. Example #1 - Actual Game Cutscene. Game's framerate after FG ON during camera pan from normal (19ms avg frametime) to complex (37ms avg frametime over 1 sec) and back to normal scene complexity (19ms avg frametime). -After the panning is done, +After the panning is done, - Default Tuning now gets stuck at targeting ~33ms after panning to a complex scene. GPU utilization significantly lower in this case. -- Tuning Set B and Tuning Set A are able to recover close to ~19ms because of these 2 tuning result in lower "target frametime delta" than Default Tuning. +- Tuning Set B and Tuning Set A are able to recover close to ~19ms because of these 2 tuning result in lower "target frametime delta" than Default Tuning. However, larger varianceFactor or safetyMarginInMs results in higher variance. As seen in Example #2 bellow. diff --git a/include/ffx_framegeneration.h b/include/ffx_framegeneration.h index c44faed77b..3e1de2464e 100644 --- a/include/ffx_framegeneration.h +++ b/include/ffx_framegeneration.h @@ -1,7 +1,7 @@ // This file is part of the FidelityFX SDK. // // Copyright (C) 2024 Advanced Micro Devices, Inc. -// +// // 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 @@ -134,7 +134,7 @@ struct ffxDispatchDescFrameGenerationPrepare float cameraFovAngleVertical; ///< The camera angle field of view in the vertical direction (expressed in radians). float viewSpaceToMetersFactor; ///< The scale factor to convert view space units to meters struct FfxApiResource depth; ///< The depth buffer data - struct FfxApiResource motionVectors; ///< The motion vector data + struct FfxApiResource motionVectors; ///< The motion vector data }; #define FFX_API_CONFIGURE_DESC_TYPE_FRAMEGENERATION_KEYVALUE 0x00020006u @@ -162,7 +162,7 @@ struct ffxQueryDescFrameGenerationGetGPUMemoryUsage struct ffxConfigureDescFrameGenerationRegisterDistortionFieldResource { ffxConfigureDescHeader header; - struct FfxApiResource distortionField; ///< A resource containing distortion offset data. Needs to be 2-component (ie. RG). Read by FG shaders via Sample. Resource's xy components encodes [UV coordinate of pixel after lens distortion effect- UV coordinate of pixel before lens distortion]. + struct FfxApiResource distortionField; ///< A resource containing distortion offset data. Needs to be 2-component (ie. RG). Read by FG shaders via Sample. Resource's xy components encodes [UV coordinate of pixel after lens distortion effect- UV coordinate of pixel before lens distortion]. }; #define FFX_API_CREATE_CONTEXT_DESC_TYPE_FRAMEGENERATION_HUDLESS 0x00020009u diff --git a/include/ffx_framegeneration.hpp b/include/ffx_framegeneration.hpp index 7d5cb44766..af4977bcb2 100644 --- a/include/ffx_framegeneration.hpp +++ b/include/ffx_framegeneration.hpp @@ -1,7 +1,7 @@ // This file is part of the FidelityFX SDK. // // Copyright (C) 2024 Advanced Micro Devices, Inc. -// +// // 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 diff --git a/package/Interface/CommunityShaders/Fonts/OFL.txt b/package/Interface/CommunityShaders/Fonts/OFL.txt index 5823d6a28e..5488f104a8 100644 --- a/package/Interface/CommunityShaders/Fonts/OFL.txt +++ b/package/Interface/CommunityShaders/Fonts/OFL.txt @@ -17,7 +17,7 @@ with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, +fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The diff --git a/package/Shaders/Common/FastMath.hlsli b/package/Shaders/Common/FastMath.hlsli index 54b687c542..462af6b792 100644 --- a/package/Shaders/Common/FastMath.hlsli +++ b/package/Shaders/Common/FastMath.hlsli @@ -4,7 +4,7 @@ Optimized and tested on AMD GCN architecture. Release notes: v0.41 minor bug fixes, missing references - + v0.4 new constants calculated for new ranges, minor optimization and precision improvements Developed during production of : Far Cry 4, Ubisoft Montreal v0.3 added Newton Raphson 1 and 2 iterations @@ -16,7 +16,7 @@ Contact information: Michal Drobot - @MichalDrobot hello@drobot.org - Presented publicly part of a course: + Presented publicly part of a course: Low Level Optimizations for AMD GCN (available @ http://michaldrobot.com/publications/) ********************************************************************************/ diff --git a/package/Shaders/Common/VR.hlsli b/package/Shaders/Common/VR.hlsli index 6822e0f4ec..753deb37c5 100644 --- a/package/Shaders/Common/VR.hlsli +++ b/package/Shaders/Common/VR.hlsli @@ -57,7 +57,7 @@ namespace Stereo /** Converts from eye specific uv to general uv [0,1]. - In VR, texture buffers include the left and right eye in the same buffer. + In VR, texture buffers include the left and right eye in the same buffer. This means the x value [0, .5] represents the left eye, and the x value (.5, 1] are the right eye. This returns the adjusted value @param uv - eye specific uv coords [0,1]; if uv.x < 0.5, it's a left eye; otherwise right @@ -173,11 +173,11 @@ namespace Stereo /** * @brief Checks if the color is non zero by testing if the color is greater than 0 by epsilon. * - * This function check is a color is non black. It uses a small epsilon value to allow for + * This function check is a color is non black. It uses a small epsilon value to allow for * floating point imprecision. * * For screen-space reflection (SSR), this acts as a mask and checks for an invalid reflection by - * checking if the reflection color is essentially black (close to zero). + * checking if the reflection color is essentially black (close to zero). * * @param[in] ssrColor The color to check. * @param[in] epsilon Small tolerance value used to determine if the color is close to zero. @@ -193,11 +193,11 @@ namespace Stereo * @brief Converts mono UV coordinates from one eye to the corresponding mono UV coordinates of the other eye. * * This function is used to transition UV coordinates from one eye's perspective to the other eye in a stereo rendering setup. - * It operates by converting the mono UV to clip space, transforming it into world space, and then reprojecting it - * into the other eye's clip space before converting back to UV coordinates. It supports dynamic resolution adjustments + * It operates by converting the mono UV to clip space, transforming it into world space, and then reprojecting it + * into the other eye's clip space before converting back to UV coordinates. It supports dynamic resolution adjustments * and applies eye offset adjustments for correct stereo separation. * - * The function considers the aspect of VR by modifying the NDC to view space conversion based on the stereo setup, + * The function considers the aspect of VR by modifying the NDC to view space conversion based on the stereo setup, * ensuring accurate rendering across both eyes. * * @param[in] monoUV The UV coordinates and depth value (Z component) for the current eye, in the range [0,1]. @@ -243,12 +243,12 @@ namespace Stereo * If the UV coordinates are outside the frame of both eyes, it returns the adjusted UV coordinates for the current eye. * * The function ensures that the UV coordinates are correctly adjusted for stereo rendering, taking into account boundary conditions - * and preserving accurate reflections. + * and preserving accurate reflections. * Based on concepts from https://cuteloong.github.io/publications/scssr24/ * Wu, X., Xu, Y., & Wang, L. (2024). Stereo-consistent Screen Space Reflection. Computer Graphics Forum, 43(4). * * We do not have a backface depth so we may be ray marching even though the ray is in an object. - + * @param[in] monoUV Current UV coordinates with depth information, [0-1]. Must not be dynamic resolution adjusted. * @param[in] eyeIndex Index of the current eye (0 or 1). * @param[out] fromOtherEye Boolean indicating if the result UV coordinates are from the other eye. diff --git a/src/Feature.h b/src/Feature.h index 8e3f2727b0..b1ff25094a 100644 --- a/src/Feature.h +++ b/src/Feature.h @@ -15,7 +15,7 @@ struct Feature virtual bool HasShaderDefine(RE::BSShader::Type) { return false; } /** * Whether the feature supports VR. - * + * * \return true if VR supported; else false */ virtual bool SupportsVR() { return false; } diff --git a/src/ShaderCache.h b/src/ShaderCache.h index 1361e0f50c..eb8f124251 100644 --- a/src/ShaderCache.h +++ b/src/ShaderCache.h @@ -336,11 +336,11 @@ namespace SIE /** * @brief Updates the shader modification time for the given shader type. - * - * This function checks if the shader's file modification time has changed or - * forces an update based on the a_forceUpdate flag. If the file does not exist, + * + * This function checks if the shader's file modification time has changed or + * forces an update based on the a_forceUpdate flag. If the file does not exist, * or the shader type is invalid, the update is skipped. - * + * * @param a_type The shader type as a string (case insensitive). * @param a_forceUpdate If true, forces an update regardless of the actual file modification time. * @return true if the shader modification time was updated, false otherwise. @@ -348,10 +348,10 @@ namespace SIE bool UpdateShaderModifiedTime(const std::string& a_type, boolean a_forceUpdate = false); /** * @brief Checks if the shader has been modified since the given time. - * + * * This function compares the shader's last modification time against the provided * time point to determine if it has been updated. - * + * * @param a_type The shader type as a string (case insensitive). * @param a_current The time point to compare against. * @return true if the shader has been modified after the given time point, false otherwise. @@ -363,21 +363,21 @@ namespace SIE /** * @brief Clears and marks shaders for recompilation based on the given path. * - * This function looks up the provided `a_path` in the `hlslToShaderMap`. - * If the path exists in the map, it iterates through all the shader entries associated - * with that path, clears the shaders, and marks them for recompilation by updating their + * This function looks up the provided `a_path` in the `hlslToShaderMap`. + * If the path exists in the map, it iterates through all the shader entries associated + * with that path, clears the shaders, and marks them for recompilation by updating their * modified times, and logs the operation. * * @param a_path The file path associated with the shaders to be marked for recompilation. - * + * * @returns bool whether a shader was found in the `hlslToShaderMap` - * + * * @note The function assumes that `a_path` corresponds to shaders stored in `hlslToShaderMap`. * If the path is not found in the map, the function does nothing. Also, only files compiled - * during session will be identified. Disk cached shaders will not be cleared and a further + * during session will be identified. Disk cached shaders will not be cleared and a further * cache clear may be necessary. - * - * @threadsafe The function locks the internal map (`mapMutex`) to ensure thread safety when + * + * @threadsafe The function locks the internal map (`mapMutex`) to ensure thread safety when * accessing or modifying shared shader map data. */ bool Clear(const std::string& a_path); @@ -416,9 +416,9 @@ namespace SIE /** * @brief Clears all shaders of a specific type from the shader map. - * - * This function removes all shaders of the specified type (`RE::BSShader::Type`) from the shader map. - * + * + * This function removes all shaders of the specified type (`RE::BSShader::Type`) from the shader map. + * * @param a_type The shader type (e.g., Grass, Sky, Water) to be cleared from the map. */ void ClearShaderMap(RE::BSShader::Type a_type); @@ -690,17 +690,17 @@ namespace SIE * @brief Updates the shader cache for a specific file path and determines whether to clear the cache. * * This function checks if the given file exists and is a shader file (with the ".hlsl" extension). - * It then updates the cache with the modified time for the shader file and marks shaders for recompilation + * It then updates the cache with the modified time for the shader file and marks shaders for recompilation * based on the given path. If a specific shader is not found in the cache, it may trigger a cache clear. * * @param filePath The path of the shader file to update. * @param cache Reference to the shader cache to update. * @param clearCache A boolean flag indicating whether the entire cache should be cleared. * @param fileDone A boolean flag that signals whether the update process is done for the current file. - * + * * @note The function only processes files with an ".hlsl" extension and ignores directories. * It assumes case-insensitive handling for shader types and extensions. - * + * * @return Void. Updates internal state and modifies `clearCache` and `fileDone` by reference. */ void UpdateCache(const std::filesystem::path& filePath, SIE::ShaderCache* cache, bool& clearCache, bool& retFlag); diff --git a/src/State.h b/src/State.h index 827263cf8c..b4085c916d 100644 --- a/src/State.h +++ b/src/State.h @@ -92,7 +92,7 @@ class State *

* Developer mode is active when the log level is trace or debug. *

- * + * * @return Whether in developer mode. */ bool IsDeveloperMode(); diff --git a/src/Utils/Format.h b/src/Utils/Format.h index 63e78814a7..4ae33a1b3e 100644 --- a/src/Utils/Format.h +++ b/src/Utils/Format.h @@ -10,13 +10,13 @@ namespace Util std::string DefinesToString(const std::vector& defines); /** - * @brief Normalizes a file path by replacing backslashes with forward slashes, + * @brief Normalizes a file path by replacing backslashes with forward slashes, * removing redundant slashes, and converting all characters to lowercase. - * + * * This function ensures that the file path uses consistent forward slashes - * (`/`), eliminates consecutive slashes (`//`), and converts all characters + * (`/`), eliminates consecutive slashes (`//`), and converts all characters * in the path to lowercase for case-insensitive comparisons. - * + * * @param a_path The original file path to be normalized. * @return A normalized file path as a lowercase string with single forward slashes. */ diff --git a/src/Utils/Game.h b/src/Utils/Game.h index 8ecea21106..1e1479434e 100644 --- a/src/Utils/Game.h +++ b/src/Utils/Game.h @@ -5,9 +5,9 @@ /** @def GET_INSTANCE_MEMBER @brief Set variable in current namespace based on instance member from GetRuntimeData or GetVRRuntimeData. - + @warning The class must have both a GetRuntimeData() and GetVRRuntimeData() function. - + @param a_value The instance member value to access (e.g., renderTargets). @param a_source The instance of the class (e.g., state). @result The a_value will be set as a variable in the current namespace. (e.g., auto& renderTargets = state->renderTargets;) @@ -18,9 +18,9 @@ /** @def GET_INSTANCE_MEMBER_PTR @brief Return refptr to runtimedata in current namespace based on instance member from GetRuntimeData or GetVRRuntimeData. - + @warning The class must have both a GetRuntimeData() and GetVRRuntimeData() function. - + @param a_value The instance member value to access (e.g., renderTargets). @param a_source The instance of the class (e.g., state). @result The a_value will be returned as a refptr. (e.g., &state->renderTargets;) @@ -52,7 +52,7 @@ namespace Util /** * @brief Checks if dynamic resolution is currently enabled. - * + * * @return true if dynamic resolution is enabled, false otherwise. */ bool IsDynamicResolution(); diff --git a/src/Utils/GameSetting.h b/src/Utils/GameSetting.h index 7784118f08..ceec08b619 100644 --- a/src/Utils/GameSetting.h +++ b/src/Utils/GameSetting.h @@ -5,10 +5,10 @@ namespace Util /** * @brief Dumps the names of all settings from the specified setting collections and the game setting collection. - * + * * This function retrieves settings from two INI setting collections (`INISettingCollection` and `INIPrefSettingCollection`) * and logs their names. It also retrieves and logs settings from the game setting collection (`GameSettingCollection`). - * + * * The output is logged using the `logger::info` method, and it includes the collection name for better clarity on where * each setting belongs. */ @@ -26,7 +26,7 @@ namespace Util /** * @brief Updates boolean settings in the provided map, setting them to the specified value. - * + * * @param settingsMap A map containing settings to update, where each setting is associated with its name. * @param featureName The name of the feature being enabled or disabled, used for logging purposes. * @param a_value The value to set for the boolean settings. @@ -35,10 +35,10 @@ namespace Util /** * @brief Updates boolean settings in the provided map, setting them to true. - * + * * This function is intended to be used when features are disabled in Skyrim by default. * It logs the changes and supports customizing the feature name in the log output. - * + * * @param settingsMap A map containing settings to update, where each setting is associated with its name. * @param featureName The name of the feature being enabled, used for logging purposes. */ @@ -46,7 +46,7 @@ namespace Util /** * @brief Updates boolean settings in the provided map, setting them to false. - * + * * @param settingsMap A map containing settings to update, where each setting is associated with its name. * @param featureName The name of the feature being disabled, used for logging purposes. */ @@ -54,14 +54,14 @@ namespace Util /** * @brief Resets game settings to their default values if the current values do not match the defaults. - * + * * This function iterates through all game settings in the provided map and checks whether each setting's * current value is equal to its default value. If they differ, the current value is updated to the default value. - * + * * The function assumes that the `gameSetting` structure contains the following fields: * - `defaultValue`: The default value for the setting. * - `currentValue`: The current value of the setting. - * + * * @param settingsMap A map of setting names to `gameSetting` objects, where each object contains * the information for a specific game setting. The map is modified in place. */ @@ -69,9 +69,9 @@ namespace Util /** * @brief Renders a tree of ImGui elements for the specified settings. - * + * * This function generates ImGui UI elements for the settings provided in the map. - * + * * @param settingsMap The map of settings to be rendered. * @param tableName A unique identifier for the ImGui tree. */ @@ -79,9 +79,9 @@ namespace Util /** * @brief Renders an appropriate ImGui element (e.g., checkbox, slider) based on the variable type. - * + * * This function determines the type of setting from its name and renders the corresponding UI element. - * + * * @tparam T The type of the setting value. * @param settingName The name of the setting. * @param settingData The metadata of the setting. @@ -93,9 +93,9 @@ namespace Util /** * @brief Renders an appropriate ImGui element for RE::Setting data. - * + * * This function creates UI elements for settings that are tied to the RE::Setting structure. - * + * * @param settingName The name of the setting. * @param settingData The metadata of the setting. * @param setting Pointer to the RE::Setting. @@ -105,20 +105,20 @@ namespace Util /** * @brief Saves the provided game settings to the INI file. - * + * * This function iterates through the settings map and saves settings that are managed via * the INISettingCollection (i.e., those without an offset) by calling `WriteSetting`. - * + * * @param settingsMap A map of game settings to be saved. */ void SaveGameSettings(const std::map& settingsMap); /** * @brief Loads the provided game settings from the INI file. - * + * * This function iterates through the settings map and loads settings that are managed via * the INISettingCollection (i.e., those without an offset) by calling `ReadSetting`. - * + * * @param settingsMap A map of game settings to be loaded. */ void LoadGameSettings(const std::map& settingsMap);