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.
 
 
 
 

95 lines
2.6 KiB

using System;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
namespace FidelityFX.FrameGen
{
public static class FrameInterpolation
{
public struct ContextDescription
{
public InitializationFlags flags;
public Vector2Int maxRenderSize;
public Vector2Int displaySize;
public GraphicsFormat backBufferFormat;
public FrameInterpolationShaders shaders;
}
// TODO: turn all of these into structs
public class DispatchDescription
{
}
[Flags]
public enum InitializationFlags
{
EnableDepthInverted = 1 << 0,
EnableDepthInfinite = 1 << 1,
EnableHDRColorInput = 1 << 3,
EnableDisplayResolutionMotionVectors = 1 << 4,
EnableJitterMotionVectors = 1 << 5,
EnableAsyncSupport = 1 << 6,
}
[Flags]
public enum DispatchFlags
{
DrawDebugTearLines = 1 << 0,
DrawDebugResetIndicators = 1 << 1,
DrawDebugView = 1 << 2,
}
[Serializable, StructLayout(LayoutKind.Sequential)]
internal struct Constants
{
public Vector2Int renderSize;
public Vector2Int displaySize;
public Vector2 displaySizeRcp;
public float cameraNear;
public float cameraFar;
public Vector2Int upscalerTargetSize;
public int mode;
public int reset;
public Vector4 deviceToViewDepth;
public float deltaTime;
public int HUDLessAttachedFactor;
public Vector2 unused;
public Vector2 opticalFlowScale;
public int opticalFlowBlockSize;
public uint dispatchFlags;
public Vector2Int maxRenderSize;
public int opticalFlowHalfResMode;
public int numInstances;
public Vector2Int interpolationRectBase;
public Vector2Int interpolationRectSize;
public Vector3 debugBarColor;
public uint backBufferTransferFunction;
public Vector2 minMaxLuminance;
public float tanHalfFOV;
public float pad;
public Vector2 jitter;
public Vector2 motionVectorScale;
}
[Serializable, StructLayout(LayoutKind.Sequential)]
internal struct InpaintingPyramidConstants
{
public uint mips;
public uint numWorkGroups;
public uint workGroupOffsetX;
public uint workGroupOffsetY;
}
}
}