From 91bd6d31d3358b1cc38776d92b6a1497c2d9c895 Mon Sep 17 00:00:00 2001 From: Rodrigo Holztrattner Date: Wed, 4 Dec 2024 12:11:46 -0700 Subject: [PATCH] Fix sgsr2 shader code and include and add missing project into Android project Signed-off-by: Rodrigo Holztrattner --- project/android/settings.gradle | 2 +- samples/sgsr2/shaders/sgsr2_activate.comp | 5 +---- samples/sgsr2/shaders/sgsr2_convert.comp | 1 + samples/sgsr2/shaders/sgsr2_convert2.frag | 2 +- samples/sgsr2/shaders/sgsr2_upscale.comp | 1 + samples/sgsr2/shaders/sgsr2_upscale2.frag | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/project/android/settings.gradle b/project/android/settings.gradle index 1a89c2d..2304f1b 100644 --- a/project/android/settings.gradle +++ b/project/android/settings.gradle @@ -1,4 +1,4 @@ -include ':empty', ':hello-gltf', ':hdrSwapchain', ':SubPass', ':shaderResolveTonemap', ':rotatedCopy', ':BloomImageProcessing', ':rayQueryShadows',':rayReflections',':sgsr' +include ':empty', ':hello-gltf', ':hdrSwapchain', ':SubPass', ':shaderResolveTonemap', ':rotatedCopy', ':BloomImageProcessing', ':rayQueryShadows',':rayReflections',':sgsr',':sgsr2' project(':empty').projectDir = new File('../../samples/empty') project(':hello-gltf').projectDir = new File('../../samples/hello-gltf') diff --git a/samples/sgsr2/shaders/sgsr2_activate.comp b/samples/sgsr2/shaders/sgsr2_activate.comp index 2068e04..81a5aa9 100644 --- a/samples/sgsr2/shaders/sgsr2_activate.comp +++ b/samples/sgsr2/shaders/sgsr2_activate.comp @@ -1,4 +1,5 @@ #version 320 es + //============================================================================================================ // // @@ -88,10 +89,6 @@ void main() float Ksep = 1.37e-05f; float Kfov = params.cameraFovAngleHor; float Ksep_Kfov_diagonal = Ksep * Kfov * diagonal_length; -<<<<<<< HEAD -======= - ->>>>>>> main for (int index = 0; index < 4; index+=2){ vec4 gPrevdepth = textureGatherOffset(MotionDepthAlphaBuffer, PrevUV, sampleOffset[index], 2); float tdepth1 = min(gPrevdepth.x, gPrevdepth.y); diff --git a/samples/sgsr2/shaders/sgsr2_convert.comp b/samples/sgsr2/shaders/sgsr2_convert.comp index 90cc6a6..0c1716e 100644 --- a/samples/sgsr2/shaders/sgsr2_convert.comp +++ b/samples/sgsr2/shaders/sgsr2_convert.comp @@ -1,4 +1,5 @@ #version 320 es + //============================================================================================================ // // diff --git a/samples/sgsr2/shaders/sgsr2_convert2.frag b/samples/sgsr2/shaders/sgsr2_convert2.frag index a8c84e4..1db2cbc 100644 --- a/samples/sgsr2/shaders/sgsr2_convert2.frag +++ b/samples/sgsr2/shaders/sgsr2_convert2.frag @@ -114,4 +114,4 @@ void main() } MotionDepthClipAlphaBuffer = vec4(motion, depthclip, 0.0); -} +} \ No newline at end of file diff --git a/samples/sgsr2/shaders/sgsr2_upscale.comp b/samples/sgsr2/shaders/sgsr2_upscale.comp index d909d21..1c5b07a 100644 --- a/samples/sgsr2/shaders/sgsr2_upscale.comp +++ b/samples/sgsr2/shaders/sgsr2_upscale.comp @@ -1,4 +1,5 @@ #version 320 es + //============================================================================================================ // // diff --git a/samples/sgsr2/shaders/sgsr2_upscale2.frag b/samples/sgsr2/shaders/sgsr2_upscale2.frag index be908f7..aea56b0 100644 --- a/samples/sgsr2/shaders/sgsr2_upscale2.frag +++ b/samples/sgsr2/shaders/sgsr2_upscale2.frag @@ -284,4 +284,4 @@ void main() Upsampledcw.xyz = mix(HistoryColor, Upsampledcw.xyz, alpha); Output = vec4(Upsampledcw.xyz, 0.0); -} +} \ No newline at end of file