Browse Source

More specifically, set NDC Y-coordinate to be up when the Unity graphics API has UV's starting at the top

sgsr2_fs
Nico de Poel 1 year ago
parent
commit
4f8cf086bf
  1. 4
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/sgsr2_common.hlsl

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

@ -1,8 +1,10 @@
#define EPSILON 1.192e-07f #define EPSILON 1.192e-07f
#if UNITY_UV_STARTS_AT_TOP
#define REQUEST_NDC_Y_UP #define REQUEST_NDC_Y_UP
#endif
#ifdef UNITY_REVERSED_Z
#if UNITY_REVERSED_Z
#define DEPTH_NEAREST(a, b) max((a), (b)) #define DEPTH_NEAREST(a, b) max((a), (b))
#define DEPTH_CLIP(depth) ((depth) > 1.0e-05f) #define DEPTH_CLIP(depth) ((depth) > 1.0e-05f)
#else #else

Loading…
Cancel
Save