mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-20 08:39:58 -04:00
Triforce v0.2.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_GAME_MOTION_VECTOR_FIELD_X 0
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_GAME_MOTION_VECTOR_FIELD_Y 1
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_COUNTERS 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_0 3
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_1 4
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_2 5
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_3 6
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_4 7
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_5 8
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_6 9
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_7 10
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_8 11
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_9 12
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_10 13
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_11 14
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_12 15
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 16
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_INPAINTING_PYRAMID 17
|
||||
|
||||
#ifdef FFX_HALF
|
||||
#undef FFX_HALF
|
||||
#define FFX_HALF 0
|
||||
#endif
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_compute_game_vector_field_inpainting_pyramid.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 256
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
computeFrameinterpolationGameVectorFieldInpaintingPyramid(FfxInt32x3(gl_WorkGroupID), FfxInt32(gl_LocalInvocationIndex));
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_OUTPUT 0
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_COUNTERS 1
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_0 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_1 3
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_2 4
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_3 5
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_4 6
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_5 7
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_6 8
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_7 9
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_8 10
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_9 11
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_10 12
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_11 13
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_INPAINTING_PYRAMID_MIPMAP_12 14
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 15
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_INPAINTING_PYRAMID 16
|
||||
|
||||
#ifdef FFX_HALF
|
||||
#undef FFX_HALF
|
||||
#define FFX_HALF 0
|
||||
#endif
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_compute_inpainting_pyramid.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 256
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
computeFrameinterpolationInpaintingPyramid(FfxInt32x3(gl_WorkGroupID), FfxInt32(gl_LocalInvocationIndex));
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
// Needed for rw_output declaration
|
||||
#extension GL_EXT_shader_image_load_formatted : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_GAME_MOTION_VECTOR_FIELD_X 0
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_GAME_MOTION_VECTOR_FIELD_Y 1
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW_MOTION_VECTOR_FIELD_X 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW_MOTION_VECTOR_FIELD_Y 3
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DISOCCLUSION_MASK 4
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_PRESENT_BACKBUFFER 5
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_INPAINTING_PYRAMID 6
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_CURRENT_INTERPOLATION_SOURCE 7
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DISTORTION_FIELD 8
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_OUTPUT 9
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 10
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_debug_view.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
computeDebugView(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_GAME_MOTION_VECTOR_FIELD_X 0
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_GAME_MOTION_VECTOR_FIELD_Y 1
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_RECONSTRUCTED_DEPTH_PREVIOUS_FRAME 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DILATED_DEPTH 3
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_RECONSTRUCTED_DEPTH_INTERPOLATED_FRAME 4
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_INPAINTING_PYRAMID 5
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DISTORTION_FIELD 6
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_DISOCCLUSION_MASK 7
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 8
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_disocclusion_mask.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
computeDisocclusionMask(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DILATED_MOTION_VECTORS 0
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DILATED_DEPTH 1
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_PREVIOUS_INTERPOLATION_SOURCE 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_CURRENT_INTERPOLATION_SOURCE 3
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DISTORTION_FIELD 4
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_GAME_MOTION_VECTOR_FIELD_X 5
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_GAME_MOTION_VECTOR_FIELD_Y 6
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 7
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_game_motion_vector_field.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
computeGameFieldMvs(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
// Needed for rw_output declaration
|
||||
#extension GL_EXT_shader_image_load_formatted : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW_SCENE_CHANGE_DETECTION 0
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_INPAINTING_PYRAMID 1
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_PRESENT_BACKBUFFER 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_CURRENT_INTERPOLATION_SOURCE 3
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_OUTPUT 7
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 8
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_inpainting.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
computeInpainting(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW 0
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW_CONFIDENCE 1
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DILATED_DEPTH 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_PREVIOUS_INTERPOLATION_SOURCE 3
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_CURRENT_INTERPOLATION_SOURCE 4
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_OPTICAL_FLOW_MOTION_VECTOR_FIELD_X 6
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_OPTICAL_FLOW_MOTION_VECTOR_FIELD_Y 7
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 8
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_optical_flow_vector_field.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
computeOpticalFlowVectorField(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
65
third_party/fidelityfx-sdk/shaders/frameinterpolation/ffx_frameinterpolation_pass.glsl
vendored
Normal file
65
third_party/fidelityfx-sdk/shaders/frameinterpolation/ffx_frameinterpolation_pass.glsl
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
// Needed for rw_output declaration
|
||||
#extension GL_EXT_shader_image_load_formatted : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_GAME_MOTION_VECTOR_FIELD_X 0
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_GAME_MOTION_VECTOR_FIELD_Y 1
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW_MOTION_VECTOR_FIELD_X 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW_MOTION_VECTOR_FIELD_Y 3
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_PREVIOUS_INTERPOLATION_SOURCE 4
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_CURRENT_INTERPOLATION_SOURCE 5
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DISOCCLUSION_MASK 6
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_INPAINTING_PYRAMID 7
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_COUNTERS 8
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_OUTPUT 9
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 10
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
computeFrameinterpolation(ivec2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_INPUT_MOTION_VECTORS 0
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_INPUT_DEPTH 1
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_RECONSTRUCTED_DEPTH_PREVIOUS_FRAME 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_DILATED_MOTION_VECTORS 3
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_DILATED_DEPTH 4
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 5
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_reconstruct_dilated_velocity_and_previous_depth.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
ReconstructAndDilate(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DILATED_MOTION_VECTORS 0
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DILATED_DEPTH 1
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_CURRENT_INTERPOLATION_SOURCE 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_DISTORTION_FIELD 3
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_RECONSTRUCTED_DEPTH_INTERPOLATED_FRAME 4
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 5
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_reconstruct_previous_depth.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
reconstructPreviousDepth(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
60
third_party/fidelityfx-sdk/shaders/frameinterpolation/ffx_frameinterpolation_setup_pass.glsl
vendored
Normal file
60
third_party/fidelityfx-sdk/shaders/frameinterpolation/ffx_frameinterpolation_setup_pass.glsl
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW_SCENE_CHANGE_DETECTION 0
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_GAME_MOTION_VECTOR_FIELD_X 1
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_GAME_MOTION_VECTOR_FIELD_Y 2
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_OPTICAL_FLOW_MOTION_VECTOR_FIELD_X 3
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_OPTICAL_FLOW_MOTION_VECTOR_FIELD_Y 4
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_DISOCCLUSION_MASK 5
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_UAV_COUNTERS 6
|
||||
|
||||
#define FFX_FRAMEINTERPOLATION_BIND_CB_FRAMEINTERPOLATION 7
|
||||
|
||||
#include "frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_common.h"
|
||||
#include "frameinterpolation/ffx_frameinterpolation_setup.h"
|
||||
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#define FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
#define FFX_FRAMEINTERPOLATION_NUM_THREADS layout (local_size_x = FFX_FRAMEINTERPOLATION_THREAD_GROUP_WIDTH, local_size_y = FFX_FRAMEINTERPOLATION_THREAD_GROUP_HEIGHT, local_size_z = FFX_FRAMEINTERPOLATION_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
|
||||
FFX_FRAMEINTERPOLATION_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
setupFrameinterpolationResources(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
75
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_accumulate_pass.glsl
vendored
Normal file
75
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_accumulate_pass.glsl
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
// Needed for rw_upscaled_output declaration
|
||||
#extension GL_EXT_shader_image_load_formatted : require
|
||||
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_EXPOSURE 0
|
||||
#define FSR3UPSCALER_BIND_SRV_DILATED_REACTIVE_MASKS 1
|
||||
#if FFX_FSR3UPSCALER_OPTION_LOW_RESOLUTION_MOTION_VECTORS
|
||||
#define FSR3UPSCALER_BIND_SRV_DILATED_MOTION_VECTORS 2
|
||||
#else
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_MOTION_VECTORS 2
|
||||
#endif
|
||||
#define FSR3UPSCALER_BIND_SRV_INTERNAL_UPSCALED 3
|
||||
#define FSR3UPSCALER_BIND_SRV_LANCZOS_LUT 4
|
||||
#define FSR3UPSCALER_BIND_SRV_FARTHEST_DEPTH_MIP1 5
|
||||
|
||||
#define FSR3UPSCALER_BIND_SRV_CURRENT_LUMA 6
|
||||
#define FSR3UPSCALER_BIND_SRV_LUMA_INSTABILITY 7
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_COLOR 8
|
||||
|
||||
#define FSR3UPSCALER_BIND_UAV_INTERNAL_UPSCALED 9
|
||||
#define FSR3UPSCALER_BIND_UAV_UPSCALED_OUTPUT 10
|
||||
#define FSR3UPSCALER_BIND_UAV_NEW_LOCKS 11
|
||||
|
||||
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 12
|
||||
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_common.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_sample.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_upsample.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_reproject.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_accumulate.h"
|
||||
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8
|
||||
#endif // FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
#define FFX_FSR3UPSCALER_NUM_THREADS layout (local_size_x = FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, local_size_y = FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, local_size_z = FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
|
||||
FFX_FSR3UPSCALER_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
Accumulate(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
62
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_luma_instability_pass.glsl
vendored
Normal file
62
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_luma_instability_pass.glsl
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_EXPOSURE 0
|
||||
#define FSR3UPSCALER_BIND_SRV_DILATED_REACTIVE_MASKS 1
|
||||
#define FSR3UPSCALER_BIND_SRV_DILATED_MOTION_VECTORS 2
|
||||
#define FSR3UPSCALER_BIND_SRV_FRAME_INFO 3
|
||||
#define FSR3UPSCALER_BIND_SRV_LUMA_HISTORY 4
|
||||
#define FSR3UPSCALER_BIND_SRV_FARTHEST_DEPTH_MIP1 5
|
||||
#define FSR3UPSCALER_BIND_SRV_CURRENT_LUMA 6
|
||||
|
||||
#define FSR3UPSCALER_BIND_UAV_LUMA_HISTORY 7
|
||||
#define FSR3UPSCALER_BIND_UAV_LUMA_INSTABILITY 8
|
||||
|
||||
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 9
|
||||
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_common.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_luma_instability.h"
|
||||
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8
|
||||
#endif // FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
#define FFX_FSR3UPSCALER_NUM_THREADS layout (local_size_x = FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, local_size_y = FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, local_size_z = FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
|
||||
FFX_FSR3UPSCALER_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
LumaInstability(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
65
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_luma_pyramid_pass.glsl
vendored
Normal file
65
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_luma_pyramid_pass.glsl
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FSR3UPSCALER_BIND_SRV_CURRENT_LUMA 0
|
||||
#define FSR3UPSCALER_BIND_SRV_FARTHEST_DEPTH 1
|
||||
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_GLOBAL_ATOMIC 2
|
||||
#define FSR3UPSCALER_BIND_UAV_FRAME_INFO 3
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_0 4
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_1 5
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_2 6
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_3 7
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_4 8
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_5 9
|
||||
#define FSR3UPSCALER_BIND_UAV_FARTHEST_DEPTH_MIP1 10
|
||||
|
||||
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 11
|
||||
#define FSR3UPSCALER_BIND_CB_SPD 12
|
||||
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_common.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_luma_pyramid.h"
|
||||
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 256
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
#define FFX_FSR3UPSCALER_NUM_THREADS layout (local_size_x = FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, local_size_y = FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, local_size_z = FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
|
||||
FFX_FSR3UPSCALER_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
ComputeAutoExposure(gl_WorkGroupID, gl_LocalInvocationIndex);
|
||||
}
|
||||
61
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_prepare_inputs_pass.glsl
vendored
Normal file
61
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_prepare_inputs_pass.glsl
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_MOTION_VECTORS 0
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_DEPTH 1
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_COLOR 2
|
||||
|
||||
#define FSR3UPSCALER_BIND_UAV_DILATED_MOTION_VECTORS 3
|
||||
#define FSR3UPSCALER_BIND_UAV_DILATED_DEPTH 4
|
||||
#define FSR3UPSCALER_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH 5
|
||||
#define FSR3UPSCALER_BIND_UAV_FARTHEST_DEPTH 6
|
||||
#define FSR3UPSCALER_BIND_UAV_CURRENT_LUMA 7
|
||||
|
||||
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 8
|
||||
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_common.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_prepare_inputs.h"
|
||||
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
#define FFX_FSR3UPSCALER_NUM_THREADS layout (local_size_x = FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, local_size_y = FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, local_size_z = FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
|
||||
FFX_FSR3UPSCALER_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
PrepareInputs(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
65
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_prepare_reactivity_pass.glsl
vendored
Normal file
65
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_prepare_reactivity_pass.glsl
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FSR3UPSCALER_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH 0
|
||||
#define FSR3UPSCALER_BIND_SRV_DILATED_MOTION_VECTORS 1
|
||||
#define FSR3UPSCALER_BIND_SRV_DILATED_DEPTH 2
|
||||
#define FSR3UPSCALER_BIND_SRV_REACTIVE_MASK 3
|
||||
#define FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK 4
|
||||
#define FSR3UPSCALER_BIND_SRV_ACCUMULATION 5
|
||||
#define FSR3UPSCALER_BIND_SRV_SHADING_CHANGE 6
|
||||
#define FSR3UPSCALER_BIND_SRV_CURRENT_LUMA 7
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_EXPOSURE 8
|
||||
|
||||
#define FSR3UPSCALER_BIND_UAV_DILATED_REACTIVE_MASKS 9
|
||||
#define FSR3UPSCALER_BIND_UAV_NEW_LOCKS 10
|
||||
#define FSR3UPSCALER_BIND_UAV_ACCUMULATION 11
|
||||
|
||||
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 12
|
||||
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_common.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_prepare_reactivity.h"
|
||||
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
#define FFX_FSR3UPSCALER_NUM_THREADS layout (local_size_x = FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, local_size_y = FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, local_size_z = FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
|
||||
FFX_FSR3UPSCALER_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
PrepareReactivity(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
59
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_rcas_pass.glsl
vendored
Normal file
59
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_rcas_pass.glsl
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
// Needed for rw_upscaled_output declaration
|
||||
#extension GL_EXT_shader_image_load_formatted : require
|
||||
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_EXPOSURE 0
|
||||
#define FSR3UPSCALER_BIND_SRV_RCAS_INPUT 1
|
||||
|
||||
#define FSR3UPSCALER_BIND_UAV_UPSCALED_OUTPUT 2
|
||||
|
||||
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 3
|
||||
#define FSR3UPSCALER_BIND_CB_RCAS 4
|
||||
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_common.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_rcas.h"
|
||||
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 64
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
#define FFX_FSR3UPSCALER_NUM_THREADS layout (local_size_x = FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, local_size_y = FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, local_size_z = FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
|
||||
FFX_FSR3UPSCALER_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
RCAS(gl_LocalInvocationID.xyz, gl_WorkGroupID.xyz, gl_GlobalInvocationID.xyz);
|
||||
}
|
||||
55
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_shading_change_pass.glsl
vendored
Normal file
55
third_party/fidelityfx-sdk/shaders/fsr3upscaler/ffx_fsr3upscaler_shading_change_pass.glsl
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FSR3UPSCALER_BIND_SRV_SPD_MIPS 0
|
||||
|
||||
#define FSR3UPSCALER_BIND_UAV_SHADING_CHANGE 1
|
||||
|
||||
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 2
|
||||
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_common.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_shading_change.h"
|
||||
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
#define FFX_FSR3UPSCALER_NUM_THREADS layout (local_size_x = FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, local_size_y = FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, local_size_z = FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
|
||||
FFX_FSR3UPSCALER_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
ShadingChange(FfxInt32x2(gl_GlobalInvocationID.xy));
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FSR3UPSCALER_BIND_SRV_CURRENT_LUMA 0
|
||||
#define FSR3UPSCALER_BIND_SRV_PREVIOUS_LUMA 1
|
||||
#define FSR3UPSCALER_BIND_SRV_DILATED_MOTION_VECTORS 2
|
||||
#define FSR3UPSCALER_BIND_SRV_INPUT_EXPOSURE 3
|
||||
|
||||
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_GLOBAL_ATOMIC 4
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_0 5
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_1 6
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_2 7
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_3 8
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_4 9
|
||||
#define FSR3UPSCALER_BIND_UAV_SPD_MIPS_LEVEL_5 10
|
||||
|
||||
|
||||
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 11
|
||||
#define FSR3UPSCALER_BIND_CB_SPD 12
|
||||
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_common.h"
|
||||
#include "fsr3upscaler/ffx_fsr3upscaler_shading_change_pyramid.h"
|
||||
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 256
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
#define FFX_FSR3UPSCALER_NUM_THREADS layout (local_size_x = FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, local_size_y = FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, local_size_z = FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS
|
||||
|
||||
FFX_FSR3UPSCALER_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
ComputeShadingChangePyramid(gl_WorkGroupID, gl_LocalInvocationIndex);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_INPUT 0
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_INPUT_LEVEL_1 1
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_INPUT_LEVEL_2 2
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_INPUT_LEVEL_3 3
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_INPUT_LEVEL_4 4
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_INPUT_LEVEL_5 5
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_INPUT_LEVEL_6 6
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_CB_COMMON 7
|
||||
#define FFX_OPTICALFLOW_BIND_CB_SPD 8
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_callbacks_glsl.h"
|
||||
#include "opticalflow/ffx_opticalflow_common.h"
|
||||
#include "opticalflow/ffx_opticalflow_compute_luminance_pyramid.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_WIDTH 256
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT 1
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
#define FFX_OPTICALFLOW_NUM_THREADS layout (local_size_x = FFX_OPTICALFLOW_THREAD_GROUP_WIDTH, local_size_y = FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT, local_size_z = FFX_OPTICALFLOW_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
|
||||
FFX_OPTICALFLOW_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
ComputeOpticalFlowInputPyramid(FfxInt32x2(gl_WorkGroupID.xy), FfxInt32(gl_LocalInvocationIndex));
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_WAVE 1
|
||||
#extension GL_KHR_shader_subgroup_basic : require
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_SRV_OPTICAL_FLOW_INPUT 0
|
||||
#define FFX_OPTICALFLOW_BIND_SRV_OPTICAL_FLOW_PREVIOUS_INPUT 1
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW 2
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_SCD_OUTPUT 3
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_CB_COMMON 4
|
||||
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_callbacks_glsl.h"
|
||||
#include "opticalflow/ffx_opticalflow_common.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_BLOCK_SIZE
|
||||
#define FFX_OPTICALFLOW_BLOCK_SIZE 8
|
||||
#endif // #ifndef FFX_OPTICALFLOW_BLOCK_SIZE
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_WIDTH 64
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT 1
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_compute_optical_flow_v5.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
#define FFX_OPTICALFLOW_NUM_THREADS layout (local_size_x = FFX_OPTICALFLOW_THREAD_GROUP_WIDTH, local_size_y = FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT, local_size_z = FFX_OPTICALFLOW_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
|
||||
FFX_OPTICALFLOW_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
ComputeOpticalFlowAdvanced(FfxInt32x2(gl_GlobalInvocationID.xy), FfxInt32x2(gl_LocalInvocationID.xy), FfxInt32x2(gl_WorkGroupID.xy), FfxInt32(gl_LocalInvocationIndex));
|
||||
}
|
||||
57
third_party/fidelityfx-sdk/shaders/opticalflow/ffx_opticalflow_compute_scd_divergence_pass.glsl
vendored
Normal file
57
third_party/fidelityfx-sdk/shaders/opticalflow/ffx_opticalflow_compute_scd_divergence_pass.glsl
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_SCD_HISTOGRAM 0
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_SCD_PREVIOUS_HISTOGRAM 1
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_SCD_TEMP 2
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_SCD_OUTPUT 3
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_CB_COMMON 4
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_callbacks_glsl.h"
|
||||
#include "opticalflow/ffx_opticalflow_common.h"
|
||||
#include "opticalflow/ffx_opticalflow_compute_scd_divergence.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_WIDTH 256
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT 1
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
#define FFX_OPTICALFLOW_NUM_THREADS layout (local_size_x = FFX_OPTICALFLOW_THREAD_GROUP_WIDTH, local_size_y = FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT, local_size_z = FFX_OPTICALFLOW_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
|
||||
FFX_OPTICALFLOW_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
FfxInt32x2 iGroupSize = FfxInt32x2(FFX_OPTICALFLOW_THREAD_GROUP_WIDTH, FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT);
|
||||
ComputeSCDHistogramsDivergence(FfxInt32x3(gl_GlobalInvocationID.xyz), FfxInt32x2(gl_LocalInvocationID.xy), FfxInt32(gl_LocalInvocationIndex), FfxInt32x2(gl_WorkGroupID.xy), iGroupSize);
|
||||
}
|
||||
57
third_party/fidelityfx-sdk/shaders/opticalflow/ffx_opticalflow_filter_optical_flow_pass_v5.glsl
vendored
Normal file
57
third_party/fidelityfx-sdk/shaders/opticalflow/ffx_opticalflow_filter_optical_flow_pass_v5.glsl
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_SRV_OPTICAL_FLOW_PREVIOUS 0
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW 1
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_CB_COMMON 2
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_callbacks_glsl.h"
|
||||
#include "opticalflow/ffx_opticalflow_common.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_WIDTH 16
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT 4
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_filter_optical_flow_v5.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
#define FFX_OPTICALFLOW_NUM_THREADS layout (local_size_x = FFX_OPTICALFLOW_THREAD_GROUP_WIDTH, local_size_y = FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT, local_size_z = FFX_OPTICALFLOW_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
|
||||
FFX_OPTICALFLOW_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
FilterOpticalFlow(FfxInt32x2(gl_GlobalInvocationID.xy), FfxInt32x2(gl_LocalInvocationID.xy), FfxInt32x2(gl_WorkGroupID.xy), FfxInt32(gl_LocalInvocationIndex));
|
||||
}
|
||||
55
third_party/fidelityfx-sdk/shaders/opticalflow/ffx_opticalflow_generate_scd_histogram_pass.glsl
vendored
Normal file
55
third_party/fidelityfx-sdk/shaders/opticalflow/ffx_opticalflow_generate_scd_histogram_pass.glsl
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_SRV_OPTICAL_FLOW_INPUT 0
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_SCD_HISTOGRAM 1
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_CB_COMMON 2
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_callbacks_glsl.h"
|
||||
#include "opticalflow/ffx_opticalflow_common.h"
|
||||
#include "opticalflow/ffx_opticalflow_generate_scd_histogram.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_WIDTH 32
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT 8
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
#define FFX_OPTICALFLOW_NUM_THREADS layout (local_size_x = FFX_OPTICALFLOW_THREAD_GROUP_WIDTH, local_size_y = FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT, local_size_z = FFX_OPTICALFLOW_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
|
||||
FFX_OPTICALFLOW_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
FfxInt32x2 iGroupSize = FfxInt32x2(FFX_OPTICALFLOW_THREAD_GROUP_WIDTH, FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT);
|
||||
GenerateSceneChangeDetectionHistogram(FfxInt32x3(gl_GlobalInvocationID.xyz), FfxInt32x2(gl_LocalInvocationID.xy), FfxInt32(gl_LocalInvocationIndex), FfxInt32x2(gl_WorkGroupID.xy), iGroupSize);
|
||||
}
|
||||
55
third_party/fidelityfx-sdk/shaders/opticalflow/ffx_opticalflow_prepare_luma_pass.glsl
vendored
Normal file
55
third_party/fidelityfx-sdk/shaders/opticalflow/ffx_opticalflow_prepare_luma_pass.glsl
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_SRV_INPUT_COLOR 0
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_INPUT 1
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_CB_COMMON 2
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_callbacks_glsl.h"
|
||||
#include "opticalflow/ffx_opticalflow_common.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_WIDTH 16
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT 16
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_DEPTH 1
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
#define FFX_OPTICALFLOW_NUM_THREADS layout (local_size_x = FFX_OPTICALFLOW_THREAD_GROUP_WIDTH, local_size_y = FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT, local_size_z = FFX_OPTICALFLOW_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_prepare_luma.h"
|
||||
|
||||
FFX_OPTICALFLOW_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
PrepareLuma(FfxInt32x2(gl_GlobalInvocationID.xy), FfxInt32(gl_LocalInvocationIndex));
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
#version 450
|
||||
|
||||
#extension GL_GOOGLE_include_directive : require
|
||||
#extension GL_EXT_samplerless_texture_functions : require
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_SRV_OPTICAL_FLOW_INPUT 0
|
||||
#define FFX_OPTICALFLOW_BIND_SRV_OPTICAL_FLOW_PREVIOUS_INPUT 1
|
||||
#define FFX_OPTICALFLOW_BIND_SRV_OPTICAL_FLOW 2
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_NEXT_LEVEL 3
|
||||
#define FFX_OPTICALFLOW_BIND_UAV_OPTICAL_FLOW_SCD_OUTPUT 4
|
||||
|
||||
#define FFX_OPTICALFLOW_BIND_CB_COMMON 5
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_callbacks_glsl.h"
|
||||
#include "opticalflow/ffx_opticalflow_common.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_BLOCK_SIZE
|
||||
#define FFX_OPTICALFLOW_BLOCK_SIZE 8
|
||||
#endif // #ifndef FFX_OPTICALFLOW_BLOCK_SIZE
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_WIDTH 4
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_WIDTH
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT 4
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
#define FFX_OPTICALFLOW_THREAD_GROUP_DEPTH 4
|
||||
#endif // #ifndef FFX_OPTICALFLOW_THREAD_GROUP_DEPTH
|
||||
|
||||
#include "opticalflow/ffx_opticalflow_scale_optical_flow_advanced_v5.h"
|
||||
|
||||
#ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
#define FFX_OPTICALFLOW_NUM_THREADS layout (local_size_x = FFX_OPTICALFLOW_THREAD_GROUP_WIDTH, local_size_y = FFX_OPTICALFLOW_THREAD_GROUP_HEIGHT, local_size_z = FFX_OPTICALFLOW_THREAD_GROUP_DEPTH) in;
|
||||
#endif // #ifndef FFX_OPTICALFLOW_NUM_THREADS
|
||||
|
||||
FFX_OPTICALFLOW_NUM_THREADS
|
||||
void main()
|
||||
{
|
||||
ScaleOpticalFlowAdvanced(FfxInt32x3(gl_GlobalInvocationID.xyz), FfxInt32x3(gl_LocalInvocationID.xyz));
|
||||
}
|
||||
Reference in New Issue
Block a user