Browse Source
Unity-fied all SGSR2 shaders by changing all texture declarations and accesses into TextureXR-style macros, with a shared BiRP definitions file.
sgsr2_fs
Unity-fied all SGSR2 shaders by changing all texture declarations and accesses into TextureXR-style macros, with a shared BiRP definitions file.
sgsr2_fs
7 changed files with 139 additions and 134 deletions
-
53Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_convert.compute
-
43Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_upscale.compute
-
41Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_activate.compute
-
64Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_convert.compute
-
43Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_upscale.compute
-
26Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/sgsr2_birp.hlsl
-
3Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/sgsr2_birp.hlsl.meta
@ -0,0 +1,26 @@ |
|||
#include "UnityCG.cginc" |
|||
|
|||
#define TEXTURE2D_X(textureName) Texture2D textureName |
|||
#define TYPED_TEXTURE2D_X(type, textureName) Texture2D<type> textureName |
|||
#define RW_TEXTURE2D_X(type, textureName) RWTexture2D<type> textureName |
|||
|
|||
#define COORD_TEXTURE2D_X(pixelCoord) pixelCoord |
|||
|
|||
#define LOAD_TEXTURE2D_X(textureName, unCoord2) textureName[unCoord2] |
|||
#define SAMPLE_TEXTURE2D_X_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) |
|||
#define GATHER_RED_TEXTURE2D_X(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2) |
|||
#define GATHER_BLUE_TEXTURE2D_X_OFFSET(textureName, samplerName, coord2, offset) textureName.GatherBlue(samplerName, coord2, offset) |
|||
|
|||
SamplerState s_PointClamp : register(s0); |
|||
SamplerState s_LinearClamp : register(s1); |
|||
|
|||
#define S_POINT_CLAMP s_PointClamp |
|||
#define S_LINEAR_CLAMP s_LinearClamp |
|||
|
|||
#define UNITY_XR_ASSIGN_VIEW_INDEX(viewIndex) |
|||
|
|||
inline float2 decodeVelocityFromTexture(float2 ev) |
|||
{ |
|||
// Nothing to do, motion vectors are not encoded |
|||
return ev; |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
fileFormatVersion: 2 |
|||
guid: f3edae28a3f74031996d08ca5a87c28e |
|||
timeCreated: 1734775340 |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue