Browse Source

Empirically determined the best setup for motion vectors in OpenGL, though it still doesn't make a whole lot of sense. Added opt-in debug symbols line to the upscale shaders to make analysis easier.

sgsr2_fs
Nico de Poel 1 year ago
parent
commit
ed566a8beb
  1. 1
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_upscale.compute
  2. 1
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_upscale.compute
  3. 4
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/sgsr2_birp.hlsl

1
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_upscale.compute

@ -1,4 +1,5 @@
#pragma kernel CS
//#pragma enable_d3d11_debug_symbols
#include "../sgsr2_birp.hlsl"
#include "../sgsr2_common.hlsl"

1
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_upscale.compute

@ -1,4 +1,5 @@
#pragma kernel CS
//#pragma enable_d3d11_debug_symbols
#include "../sgsr2_birp.hlsl"
#include "../sgsr2_common.hlsl"

4
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/sgsr2_birp.hlsl

@ -22,5 +22,9 @@ SamplerState s_LinearClamp : register(s1);
inline float2 decodeVelocityFromTexture(float2 ev)
{
// Nothing much to do, motion vectors are not encoded
#if UNITY_UV_STARTS_AT_TOP
return -ev;
#else
return ev;
#endif
}
Loading…
Cancel
Save