Files
GhostEngine/Ghost.RenderGraph.Concept/PassData.cs
Misaki 954e3756aa Refactor Render Graph: unified resources, benchmarking
Major overhaul of Render Graph system:
- Replaced texture handles with generic Identifier<T> for unified, type-safe resource management (textures, buffers, etc.)
- Refactored resource registry and pooling for performance and extensibility
- Added AccessFlags and TextureAccess for precise resource usage tracking
- Split passes into Raster and Compute types; introduced builder interfaces for safer pass construction
- Modernized pass setup API (SetColorAttachment, UseTexture, etc.)
- Updated command buffer and context structs to use new resource system
- Refactored barrier and aliasing logic for improved correctness
- Integrated BenchmarkDotNet for performance/memory benchmarking
- Improved blackboard type safety and removed obsolete code/extensions
- Added BenchmarkDotNet NuGet package

These changes make the Render Graph more extensible, efficient, and ready for future resource types and advanced features.
2026-01-12 23:48:56 +09:00

58 lines
1.4 KiB
C#

using Ghost.Core;
namespace Ghost.RenderGraph.Concept;
// ===== Pass Data Structures =====
// These are user-defined data structures that get passed to render functions
public sealed class GBufferData : IPassData
{
public Identifier<RGTexture> Albedo;
public Identifier<RGTexture> Normal;
public Identifier<RGTexture> Depth;
}
public sealed class LightingPassData : IPassData
{
public Identifier<RGTexture> GBufferAlbedo;
public Identifier<RGTexture> GBufferNormal;
public Identifier<RGTexture> GBufferDepth;
public Identifier<RGTexture> OutputLighting;
}
public sealed class SSAOPassData : IPassData
{
public Identifier<RGTexture> GBufferDepth;
public Identifier<RGTexture> GBufferNormal;
public Identifier<RGTexture> OutputSSAO;
}
public sealed class BloomDownsampleData : IPassData
{
public Identifier<RGTexture> Input;
public Identifier<RGTexture> Output;
}
public sealed class TAAPassData : IPassData
{
public Identifier<RGTexture> InputLighting;
public Identifier<RGTexture> OutputTAA;
}
public sealed class PostProcessingPassDataV2 : IPassData
{
public Identifier<RGTexture> InputTAA;
public Identifier<RGTexture> InputSSAO;
public Identifier<RGTexture> InputBloom;
public Identifier<RGTexture> OutputBackbuffer;
}
public sealed class ProfilerMarkerData : IPassData
{
}
public sealed class DebugPassData : IPassData
{
public Identifier<RGTexture> DebugTexture;
}