Browse Source

Added an untested and as of yet unused HDRP include file, just as an expression of what this file will look like for SRPs

sgsr2_fs
Nico de Poel 1 year ago
parent
commit
05989857c0
  1. 18
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/sgsr2_hdrp.hlsl
  2. 3
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/sgsr2_hdrp.hlsl.meta

18
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/sgsr2_hdrp.hlsl

@ -0,0 +1,18 @@
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
// Using renderSizeRcp here is a bit of a hack, but the SRPs don't offer any macros for gather with offset, and we know which texture the GatherBlue will be used for
#define GATHER_BLUE_TEXTURE2D_X_OFFSET(textureName, samplerName, coord2, offset) GATHER_BLUE_TEXTURE2D_X(textureName, samplerName, coord2 + offset * renderSizeRcp)
#define S_POINT_CLAMP s_point_clamp_sampler
#define S_LINEAR_CLAMP s_linear_clamp_sampler
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
}

3
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/sgsr2_hdrp.hlsl.meta

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: ae8ec449c111471fb8eecbd6142cb9ad
timeCreated: 1734870531
Loading…
Cancel
Save