- Enabled Vulkan on iOS
- Added GLTF2.0 loader and PBR renderer
- Added GLTF Viewer
- Added cmake options to disable specific back-ends and glslang
- Improved engine support of GLES3.0 devices
- Added new module - DiligentFX, a high-level rendering framework
- Reworked light scattering post-processing effect to be ready-to-use component
- Updated
IRenderDevice::CreateTexture()
andIRenderDevice::CreateBuffer()
to take pointer to initialization data rather than references. - Added
LayoutElement::AutoOffset
andLayoutElement::AutoOffset
values to use instead of 0 when automatically computing input layout elements offset and strides. - Renamed factory interfaces and headers:
IRenderDeviceFactoryD3D11
->IEngineFactoryD3D11
, RenderDeviceFactoryD3D11.h -> EngineFactoryD3D11.hIRenderDeviceFactoryD3D12
->IEngineFactoryD3D12
, RenderDeviceFactoryD3D12.h -> EngineFactoryD3D12.hIRenderDeviceFactoryOpenGL
->IEngineFactoryOpenGL
, RenderDeviceFactoryOpenGL.h -> EngineFactoryOpenGL.hIRenderDeviceFactoryVk
->IEngineFactoryVk
, RenderDeviceFactoryVk.h -> EngineFactoryVk.hIRenderDeviceFactoryMtl
->IEngineFactoryMtl
, RenderDeviceFactoryMtl.h -> EngineFactoryMtl.h
- Renamed
IShaderVariable
->IShaderResourceVariable
- Renamed
SHADER_VARIABLE_TYPE
->SHADER_RESOURCE_VARIABLE_TYPE
- Renamed
ShaderVariableDesc
->ShaderResourceVariableDesc
- Added
SHADER_RESOURCE_TYPE
enum - Moved shader variable type and static sampler definition from shader creation to PSO creation stage:
- Removed
IShader::GetVariable
,IShader::GetVariableCount
, andIShader::BindResources
methods - Added
IPipelineState::BindStaticResoruces
,IPipelineState::GetStaticVariableCount
, andIPipelineState::GetStaticShaderVariable
methods - Added
PipelineResourceLayoutDesc
structure andResourceLayout
member toPipelineStateDesc
- Removed
- Added
ShaderResourceDesc
structure - Added
IShader::GetResourceCount
andIShader::GetResource
methods - Replaced
IShaderVariable::GetArraySize
andIShaderVariable::GetName
methods withIShaderResourceVariable::GetResourceDesc
method - Added
HLSLShaderResourceDesc
structure as well asIShaderResourceVariableD3D
andIShaderResourceVariableD3D
interfaces to query HLSL-specific shader resource description (shader register)
With the new API, shader initialization and pipeline state creation changed as shown below.
Old API:
RefCntAutoPtr<IShader> pVS;
{
CreationAttribs.Desc.ShaderType = SHADER_TYPE_VERTEX;
CreationAttribs.EntryPoint = "main";
CreationAttribs.Desc.Name = "Cube VS";
CreationAttribs.FilePath = "cube.vsh";
pDevice->CreateShader(CreationAttribs, &pVS);
pVS->GetShaderVariable("Constants")->Set(m_VSConstants);
}
RefCntAutoPtr<IShader> pPS;
{
CreationAttribs.Desc.ShaderType = SHADER_TYPE_PIXEL;
CreationAttribs.EntryPoint = "main";
CreationAttribs.Desc.Name = "Cube PS";
CreationAttribs.FilePath = "cube.psh";
ShaderVariableDesc Vars[] =
{
{"g_Texture", SHADER_VARIABLE_TYPE_MUTABLE}
};
CreationAttribs.Desc.VariableDesc = Vars;
CreationAttribs.Desc.NumVariables = _countof(Vars);
SamplerDesc SamLinearClampDesc( FILTER_TYPE_LINEAR, FILTER_TYPE_LINEAR, FILTER_TYPE_LINEAR,
TEXTURE_ADDRESS_CLAMP, TEXTURE_ADDRESS_CLAMP, TEXTURE_ADDRESS_CLAMP);
StaticSamplerDesc StaticSamplers[] =
{
{"g_Texture", SamLinearClampDesc}
};
CreationAttribs.Desc.StaticSamplers = StaticSamplers;
CreationAttribs.Desc.NumStaticSamplers = _countof(StaticSamplers);
pDevice->CreateShader(CreationAttribs, &pPS);
}
// ...
pDevice->CreatePipelineState(PSODesc, &m_pPSO);
New API:
RefCntAutoPtr<IShader> pVS;
{
ShaderCI.Desc.ShaderType = SHADER_TYPE_VERTEX;
ShaderCI.EntryPoint = "main";
ShaderCI.Desc.Name = "Cube VS";
ShaderCI.FilePath = "cube.vsh";
pDevice->CreateShader(ShaderCI, &pVS);
}
RefCntAutoPtr<IShader> pVS;
{
ShaderCI.Desc.ShaderType = SHADER_TYPE_VERTEX;
ShaderCI.EntryPoint = "main";
ShaderCI.Desc.Name = "Cube VS";
ShaderCI.FilePath = "cube.vsh";
pDevice->CreateShader(ShaderCI, &pVS);
}
// ...
ShaderResourceVariableDesc Vars[] =
{
{SHADER_TYPE_PIXEL, "g_Texture", SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE}
};
PSODesc.ResourceLayout.Variables = Vars;
PSODesc.ResourceLayout.NumVariables = _countof(Vars);
// Define static sampler for g_Texture. Static samplers should be used whenever possible
SamplerDesc SamLinearClampDesc( FILTER_TYPE_LINEAR, FILTER_TYPE_LINEAR, FILTER_TYPE_LINEAR,
TEXTURE_ADDRESS_CLAMP, TEXTURE_ADDRESS_CLAMP, TEXTURE_ADDRESS_CLAMP);
StaticSamplerDesc StaticSamplers[] =
{
{SHADER_TYPE_PIXEL, "g_Texture", SamLinearClampDesc}
};
PSODesc.ResourceLayout.StaticSamplers = StaticSamplers;
PSODesc.ResourceLayout.NumStaticSamplers = _countof(StaticSamplers);
pDevice->CreatePipelineState(PSODesc, &m_pPSO);
m_pPSO->GetStaticShaderVariable(SHADER_TYPE_VERTEX, "Constants")->Set(m_VSConstants);
- Added Tutorial12 - Render target (credits to @dolphineye for contribution)
- Enabled MinGW build
- Enabled Vulkan on MacOS
- Implemented split barriers (DiligentGraphics/DiligentCore#43)
- Added
STATE_TRANSITION_TYPE
enum andSTATE_TRANSITION_TYPE TransitionType
member toStateTransitionDesc
structure
- Added
- Added Metal backend stub
- Samples:
- Added rendering backend selection dialog on Win32 and Mac
Core:
- Implemented explicit resource state transitions
- API Changes
- Added
RESOURCE_STATE
enum that defines the resource state - Added
RESOURCE_STATE_TRANSITION_MODE
enum that controls resource state transition mode - Added
DRAW_FLAGS
enum that controls state validation performed by Draw command - Added
Flags
member toDrawAttribs
structure (values fromDRAW_FLAGS
) - Added
IndirectAttribsBufferStateTransitionMode
member toDrawAttribs
andDispatchComputeAttribs
structures (values fromRESOURCE_STATE_TRANSITION_MODE
) - Added
StateTransitionDesc
structure that describes resource state transition barrier - Added
IDeviceContext::TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers)
method - Added
IBuffer::SetState()
,IBuffer::GetState()
,ITexture::SetState()
,ITexture::GetState()
methods - Added
IShaderResourceBinding::InitializeStaticResources()
to explicitly initialize static resources and avoid problems in multi-threaded environments - Added
InitStaticResources
parameter toIPipelineState::CreateShaderResourceBinding()
method to allow immediate initialization of static resources in a SRB - Removed default SRB object
- Renamed/moved
IBuffer::UpdateData()
toIDeviceContext::UpdateBuffer()
- Renamed/moved
IBuffer::CopyData()
toIDeviceContext::CopyBuffer()
- Renamed/moved
IBuffer::Map()
toIDeviceContext::MapBuffer()
- Renamed/moved
IBuffer::Unmap()
toIDeviceContext::UnmapBuffer()
- Removed MapFlags parameter
- Renamed/moved
ITexture::UpdateData()
toIDeviceContext::UpdateTexture()
- Renamed/moved
ITexture::CopyData()
toIDeviceContext::CopyTexture()
- Renamed/moved
ITexture::Map()
toIDeviceContext::MapTextureSubresource()
- Renamed/moved
ITexture::Unmap()
toIDeviceContext::UnmapTextureSubresource()
- Moved
ITextureView::GenerateMips()
toIDeviceContext::GenerateMips()
- Added state transition mode parameters to
IDeviceContext::UpdateBuffer()
,IDeviceContext::UpdateTexture()
,IDeviceContext::CopyBuffer()
,IDeviceContext::CopyTexture()
,IDeviceContext::SetVertexBuffers()
,IDeviceContext::SetIndexBuffers()
,IDeviceContext::ClearRenderTargets()
, andIDeviceContext::ClearDepthStencil()
methods - Replaced
COMMIT_SHADER_RESOURCES_FLAGS
enum withRESOURCE_STATE_TRANSITION_MODE
- Added
ITextureD3D12::GetD3D12ResourceState()
,IBufferD3D12::GetD3D12ResourceState()
,IBufferVk::GetAccessFlags()
, andITextureVk::GetLayout()
methods - Added
CopyTextureAttribs
structure that combines all paramters ofIDeviceContext::CopyTexture()
method
- Added
- Core
- Enabled Vulkan backend on Linux
- API Changes
- Implemented separate texture samplers:
- Added
UseCombinedTextureSamplers
andCombinedSamplerSuffix
members toShaderCreationAttribs
structure - When separate samplers are used (
UseCombinedTextureSamplers == false
), samplers are set in the same way as other shader variables via shader or SRB objects
- Added
- Removed
BIND_SHADER_RESOURCES_RESET_BINDINGS
flag, renamedBIND_SHADER_RESOURCES_KEEP_EXISTING
toBIND_SHADER_RESOURCES_KEEP_EXISTING
. AddedBIND_SHADER_RESOURCES_UPDATE_STATIC
,BIND_SHADER_RESOURCES_UPDATE_MUTABLE
,BIND_SHADER_RESOURCES_UPDATE_DYNAMIC
, andBIND_SHADER_RESOURCES_UPDATE_ALL
flags
- Implemented separate texture samplers:
- Using glslang to compile HLSL to SPIRV in Vulkan backend instead of relying on HLSL->GLSL converter
-
Core
- Added
IFence
interface andIDeviceContext::SignalFence()
method to enable CPU-GPU synchronization - Added
BUFFER_MODE_RAW
mode allowing raw buffer views in D3D11/D3D12. - Moved
Format
member fromBufferDesc
toBufferViewDesc
- Removed
IsIndirect
member fromDrawAttrbis
as settingpIndirectDrawAttribs
to a non-null buffer already indicates indirect rendering
- Added
-
Samples:
- Added Tutorial 10 - Data Streaming
- Added Tutorial 11 - Resource Updates
- Core:
- Implemented Vulkan backend
- Implemented hardware adapter & display mode enumeration in D3D11 and D3D12 modes
- Implemented initialization in fullscreen mode as well as toggling between fullscreen and windowed modes in run time
- Added sync interval parameter to ISwapChain::Present()
- API Changes
- Added
NumViewports
member toGraphicsPipelineDesc
struct - Removed
PRIMITIVE_TOPOLOGY_TYPE
type - Replaced
PRIMITIVE_TOPOLOGY_TYPE GraphicsPipelineDesc::PrimitiveTopologyType
withPRIMITIVE_TOPOLOGY GraphicsPipelineDesc::PrimitiveTopology
- Removed
DrawAttribs::Topology
- Removed
pStrides
parameter fromIDeviceContext::SetVertexBuffers()
. Strides are now defined through vertex layout.
- Added
- API Changes:
- Math library functions
SetNearFarClipPlanes()
,GetNearFarPlaneFromProjMatrix()
,Projection()
,OrthoOffCenter()
, andOrtho()
takebIsGL
flag instead ofbIsDirectX
- Vertex buffer strides are now defined by the pipeline state as part of the input layout description (
LayoutElement::Stride
) - Added
COMMIT_SHADER_RESOURCES_FLAG_VERIFY_STATES
flag - Added
NumViewports
member toGraphicsPipelineDesc
structure
- Math library functions
- Samples:
- Added fullscreen mode selection dialog box
- Implemented fullscreen mode toggle on UWP with shift + enter
- Implemented fullscreen window toggle on Win32 with alt + enter
- Added Tutorial 09 - Quads
- Fixed the following issues:
- Enabled Win32 build targeting Windows 8.1 SDK
- Enabled build customization through custom build config file
- Implemented PSO compatibility
- Fixed the following issues:
- Added MacOS and iOS support
- Removed legacy Visual Studio solution and project files
- Added API reference
- Added tutorials 1-8
- Refactored build system to use CMake and Gradle for Android
- Added support for Linux platform
- Interoperability with native API
- Accessing internal objects and handles
- Creating diligent engine buffers/textures from native resources
- Attaching to existing D3D11/D3D12 device or GL context
- Resource state and command queue synchronization for D3D12
- Integraion with Unity
- Geometry shader support
- Tessellation support
- Performance optimizations
- Support for structured buffers
- HLSL->GLSL conversion is now a two-stage process:
- Creating conversion stream
- Creating GLSL source from the stream
- Geometry shader support
- Tessellation control and tessellation evaluation shader support
- Support for non-void shader functions
- Allowing structs as input parameters for shader functions
Alpha release of Diligent Engine 2.0. The engine has been updated to take advantages of Direct3D12:
-
Pipeline State Object encompasses all coarse-grain state objects like Depth-Stencil State, Blend State, Rasterizer State, shader states etc.
-
New shader resource binding model implemented to leverage Direct3D12
-
OpenGL and Direct3D11 backends
-
Alpha release is only available on Windows platform
-
Direct3D11 backend is very thoroughly optimized and has very low overhead compared to native D3D11 implementation
-
Direct3D12 implementation is preliminary and not yet optimized
Initial release