|
|
|
@ -0,0 +1,55 @@ |
|
|
|
using System; |
|
|
|
using System.Runtime.InteropServices; |
|
|
|
using UnityEngine; |
|
|
|
|
|
|
|
namespace FidelityFX.OpticalFlow |
|
|
|
{ |
|
|
|
public static class OpticalFlow |
|
|
|
{ |
|
|
|
public static OpticalFlowContext CreateContext(in ContextDescription contextDescription) |
|
|
|
{ |
|
|
|
throw new NotImplementedException(); |
|
|
|
} |
|
|
|
|
|
|
|
public struct ContextDescription |
|
|
|
{ |
|
|
|
public Vector2Int resolution; |
|
|
|
} |
|
|
|
|
|
|
|
public struct DispatchDescription |
|
|
|
{ |
|
|
|
public ResourceView color; |
|
|
|
public ResourceView opticalFlowVector; |
|
|
|
public ResourceView opticalFlowSCD; |
|
|
|
public bool reset; |
|
|
|
public int backbufferTransferFunction; |
|
|
|
public Vector2 minMaxLuminance; |
|
|
|
} |
|
|
|
|
|
|
|
[Serializable, StructLayout(LayoutKind.Sequential)] |
|
|
|
internal struct OpticalFlowConstants |
|
|
|
{ |
|
|
|
public Vector2Int inputLumaResolution; |
|
|
|
public uint opticalFlowPyramidLevel; |
|
|
|
public uint opticalFlowPyramidLevelCount; |
|
|
|
|
|
|
|
public int frameIndex; |
|
|
|
public uint backbufferTransferFunction; |
|
|
|
public Vector2 minMaxLuminance; |
|
|
|
} |
|
|
|
|
|
|
|
[Serializable, StructLayout(LayoutKind.Sequential)] |
|
|
|
internal struct SpdConstants |
|
|
|
{ |
|
|
|
public uint mips; |
|
|
|
public uint numWorkGroups; |
|
|
|
public uint workGroupOffsetX; |
|
|
|
public uint workGroupOffsetY; |
|
|
|
|
|
|
|
public uint numWorkGroupsOpticalFlowInputPyramid; |
|
|
|
public uint pad0_; |
|
|
|
public uint pad1_; |
|
|
|
public uint pad2_; |
|
|
|
} |
|
|
|
} |
|
|
|
} |