feat(graphics): improve rendering pipeline and docs
- Refactor D3D12 backend and RenderGraph module - Update graphics RHI and core rendering components - Add Random.hlsl shader include - Regenerate API documentation and update user guides
This commit is contained in:
@@ -302,7 +302,7 @@ public struct RenderDesc
|
||||
get; set;
|
||||
}
|
||||
|
||||
public RectDesc Viewport
|
||||
public ScissorRectDesc Viewport
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ public struct ViewportDesc
|
||||
|
||||
}
|
||||
|
||||
public struct RectDesc
|
||||
public struct ScissorRectDesc
|
||||
{
|
||||
public uint Left
|
||||
{
|
||||
@@ -539,7 +539,7 @@ public struct BarrierDesc
|
||||
get; set;
|
||||
}
|
||||
|
||||
public BarrierSync SyncBefore
|
||||
public BarrierSync? SyncBefore
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
@@ -549,7 +549,7 @@ public struct BarrierDesc
|
||||
get; set;
|
||||
}
|
||||
|
||||
public BarrierAccess AccessBefore
|
||||
public BarrierAccess? AccessBefore
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
@@ -559,7 +559,7 @@ public struct BarrierDesc
|
||||
get; set;
|
||||
}
|
||||
|
||||
public BarrierLayout LayoutBefore
|
||||
public BarrierLayout? LayoutBefore
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
@@ -596,7 +596,7 @@ public struct BarrierDesc
|
||||
};
|
||||
}
|
||||
|
||||
public static BarrierDesc Buffer(Handle<GPUResource> resource, BarrierSync syncBefore, BarrierSync syncAfter, BarrierAccess accessBefore, BarrierAccess accessAfter)
|
||||
public static BarrierDesc Buffer(Handle<GPUResource> resource, BarrierSync? syncBefore, BarrierSync syncAfter, BarrierAccess? accessBefore, BarrierAccess accessAfter)
|
||||
{
|
||||
return new BarrierDesc
|
||||
{
|
||||
@@ -609,7 +609,7 @@ public struct BarrierDesc
|
||||
};
|
||||
}
|
||||
|
||||
public static BarrierDesc Texture(Handle<GPUResource> resource, BarrierSync syncBefore, BarrierSync syncAfter, BarrierAccess accessBefore, BarrierAccess accessAfter, BarrierLayout layoutBefore, BarrierLayout layoutAfter, BarrierSubresourceRange subresources = default, bool discard = false)
|
||||
public static BarrierDesc Texture(Handle<GPUResource> resource, BarrierSync? syncBefore, BarrierSync syncAfter, BarrierAccess? accessBefore, BarrierAccess accessAfter, BarrierLayout? layoutBefore, BarrierLayout layoutAfter, BarrierSubresourceRange subresources = default, bool discard = false)
|
||||
{
|
||||
return new BarrierDesc
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ public interface ICommandBuffer : IDisposable
|
||||
/// Sets the scissor rectangle
|
||||
/// </summary>
|
||||
/// <param name="rect">Scissor rectangle to set</param>
|
||||
void SetScissorRect(RectDesc rect);
|
||||
void SetScissorRect(ScissorRectDesc rect);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the optional render targets and optional depth Target for subsequent rendering operations.
|
||||
@@ -99,7 +99,7 @@ public interface ICommandBuffer : IDisposable
|
||||
/// Inserts multiple resource barriers.
|
||||
/// </summary>
|
||||
/// <param name="barrierDescs">Resource barrier descriptions</param>
|
||||
void ResourceBarrier(params ReadOnlySpan<BarrierDesc> barrierDescs);
|
||||
void Barrier(params ReadOnlySpan<BarrierDesc> barrierDescs);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the pipeline state object
|
||||
|
||||
@@ -9,7 +9,7 @@ public interface IRenderOutput
|
||||
get; set;
|
||||
}
|
||||
|
||||
RectDesc Scissor
|
||||
ScissorRectDesc Scissor
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
@@ -10,23 +10,22 @@ public static class RootSignatureLayout
|
||||
public const int ROOT_PARAMETER_COUNT = 1;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 20)]
|
||||
[StructLayout(LayoutKind.Sequential, Size = 16)]
|
||||
public struct PushConstantsData
|
||||
{
|
||||
public uint globalIndex;
|
||||
public uint viewIndex;
|
||||
public uint objectIndex;
|
||||
public const uint NUM_32BITS_VALUE = 16u / sizeof(uint);
|
||||
|
||||
public uint frameBuffer;
|
||||
public uint viewBuffer;
|
||||
public uint instanceBuffer;
|
||||
public uint instanceIndex;
|
||||
public uint materialIndex;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Size = 20)]
|
||||
public struct GlobalFrameData
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct FrameData
|
||||
{
|
||||
public uint viewBufferIndex;
|
||||
public uint instanceBufferIndex;
|
||||
public uint viewBufferCount;
|
||||
public uint instanceBufferCount;
|
||||
public uint userBufferIndex;
|
||||
}
|
||||
|
||||
@@ -34,10 +33,12 @@ public struct GlobalFrameData
|
||||
public struct InstanceData
|
||||
{
|
||||
public float4x4 localToWorld;
|
||||
public uint meshBufferIndex;
|
||||
public uint materialBufferIndex;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct PerViewData
|
||||
public struct ViewData
|
||||
{
|
||||
public float4x4 viewMatrix;
|
||||
public float4x4 projectionMatrix;
|
||||
@@ -49,7 +50,7 @@ public struct PerViewData
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public struct PerObjectData
|
||||
public struct MeshData
|
||||
{
|
||||
public float3 worldBoundsMin;
|
||||
public uint vertexBuffer;
|
||||
|
||||
Reference in New Issue
Block a user