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.
55 lines
1.6 KiB
55 lines
1.6 KiB
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_;
|
|
}
|
|
}
|
|
}
|