Development repository for FSR2 integration into Unity Post-Processing Stack V2.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
791 B

#pragma kernel CS
Texture2D InColor: register(t0);
Texture2D<float> InDepth: register(t1);
Texture2D<float2> InMotionVectors: register(t2);
RWTexture2D<float4> OutColor: register(u0);
RWTexture2D<float> OutDepth: register(u1);
RWTexture2D<float2> OutMotionVectors: register(u2);
cbuffer Params: register(b0)
{
int prepareColor;
int prepareDepth;
int prepareMotionVectors;
int pad;
};
[numthreads(8, 8, 1)]
void CS(uint2 GroupId: SV_GroupID, uint2 GroupThreadId: SV_GroupThreadID)
{
uint2 InputPos = GroupId * uint2(8, 8) + GroupThreadId;
if (prepareColor) OutColor[InputPos] = InColor[InputPos];
if (prepareDepth) OutDepth[InputPos] = InDepth[InputPos];
if (prepareMotionVectors) OutMotionVectors[InputPos] = InMotionVectors[InputPos];
}