Diligent Engine 2.5.2: render state notation and state object serialization

Discussion in 'Game Development (Technical)' started by diligent, Apr 3, 2022.

  1. diligent

    diligent New Member

    Joined:
    Dec 12, 2018
    Messages:
    23
    Likes Received:
    0
    This new release 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).

    The two key new interfaces are IArchiver that packs resource states into an archive, and IDearchiver that unpacks the states from the archive at run time.

    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:

    Code:
    {
        "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.

    Diligent Engine is free to use, check it out on GitHub.
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer