🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Diligent Engine 2.5.2: render state notation and state object packaging

Started by
0 comments, last by DiligentDev 2 years, 2 months ago

This new release of Diligent Engine introduces an API for packaging render state objects (shaders, pipeline states, resource singatures, render passes) into archives. An object archive contains data optimized for run-time loading performance (shaders are compiled into optimized byte code and patched to match resource signatures, if necessary; internal pipeline resource layouts are initialized; all objects are verified for compatibility and correctness etc.). One archive may contain data for multiple backends (e.g. Direct3D12, Vulkan, OpenGL).

This release also introduces Diligent Render State Notation, a JSON-based language that describes shaders, pipeline states, resource signatures and other objects in a convenient form:

{
    "Shaders": [
        {
            "Desc": {
                "Name": "My Vertex shader",
                "ShaderType": "VERTEX"
            },
            "SourceLanguage": "HLSL",
            "FilePath": "cube.vsh"
        },
        {
            "Desc": {
                "Name": "My Pixel shader",
                "ShaderType": "PIXEL"
            },
            "SourceLanguage": "HLSL",
            "FilePath": "cube.psh",
        }
    ],
    "Pipeleines": [
        {
            "GraphicsPipeline": {
                "DepthStencilDesc": {
                    "DepthEnable": true
                },
                "RTVFormats": {
                    "0": "RGBA8_UNORM_SRGB"
                },
                "RasterizerDesc": {
                    "CullMode": "FRONT"
                },
            },
            "PSODesc": {
                "Name": "My Pipeline State",
                "PipelineType": "GRAPHICS"
            },
            "pVS": "My Vertex shader",
            "pPS": "My Pixel shader"
        }
    ]
}

Render state notation files can be parsed and loaded dynamically at run time or packaged into archives offline using the new packaging tool.

Check it out on GitHub.

This topic is closed to new replies.

Advertisement