mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 06:34:10 +00:00
Separate bind set for material textures in the light passes to avoid allocation problems #676
This commit is contained in:
parent
f67360bc06
commit
a97c92b6a5
14 changed files with 150 additions and 107 deletions
|
@ -88,6 +88,9 @@ nvrhi::BindingSetHandle BindingCache::GetOrCreateBindingSet( const nvrhi::Bindin
|
|||
|
||||
void BindingCache::Clear()
|
||||
{
|
||||
// RB FIXME void StaticDescriptorHeap::releaseDescriptors(DescriptorIndex baseIndex, uint32_t count)
|
||||
// will try to gain a conflicting mutex lock and cause an abort signal
|
||||
|
||||
mutex.Lock();
|
||||
bindingSets.Clear();
|
||||
bindingHash.Clear();
|
||||
|
|
|
@ -256,7 +256,7 @@ public:
|
|||
~idDeferredImage();
|
||||
|
||||
idStr name;
|
||||
byte* pic;
|
||||
byte* pic;
|
||||
int width;
|
||||
int height;
|
||||
textureFilter_t textureFilter;
|
||||
|
|
|
@ -423,7 +423,21 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
nvrhi::BindingSetItem::ConstantBuffer( 0, renderProgManager.ConstantBuffer() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 0, ( nvrhi::ITexture* )GetImageAt( 0 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 1, ( nvrhi::ITexture* )GetImageAt( 1 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 2, ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 2, ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID() )
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
desc[0].bindings[0].resourceHandle = renderProgManager.ConstantBuffer();
|
||||
desc[0].bindings[1].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 0 )->GetTextureID();
|
||||
desc[0].bindings[2].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 1 )->GetTextureID();
|
||||
desc[0].bindings[3].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID();
|
||||
}
|
||||
|
||||
if( desc[1].bindings.empty() )
|
||||
{
|
||||
desc[1].bindings =
|
||||
{
|
||||
nvrhi::BindingSetItem::Texture_SRV( 3, ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 4, ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 7, ( nvrhi::ITexture* )GetImageAt( 7 )->GetTextureID() ),
|
||||
|
@ -434,21 +448,17 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
}
|
||||
else
|
||||
{
|
||||
desc[0].bindings[0].resourceHandle = renderProgManager.ConstantBuffer();
|
||||
desc[0].bindings[1].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 0 )->GetTextureID();
|
||||
desc[0].bindings[2].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 1 )->GetTextureID();
|
||||
desc[0].bindings[3].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID();
|
||||
desc[0].bindings[4].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID();
|
||||
desc[0].bindings[5].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID();
|
||||
desc[0].bindings[6].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 7 )->GetTextureID();
|
||||
desc[0].bindings[7].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 8 )->GetTextureID();
|
||||
desc[0].bindings[8].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 9 )->GetTextureID();
|
||||
desc[0].bindings[9].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 10 )->GetTextureID();
|
||||
desc[1].bindings[0].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID();
|
||||
desc[1].bindings[1].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID();
|
||||
desc[1].bindings[2].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 7 )->GetTextureID();
|
||||
desc[1].bindings[3].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 8 )->GetTextureID();
|
||||
desc[1].bindings[4].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 9 )->GetTextureID();
|
||||
desc[1].bindings[5].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 10 )->GetTextureID();
|
||||
}
|
||||
|
||||
if( desc[1].bindings.empty() )
|
||||
if( desc[2].bindings.empty() )
|
||||
{
|
||||
desc[1].bindings =
|
||||
desc[2].bindings =
|
||||
{
|
||||
nvrhi::BindingSetItem::Sampler( 0, commonPasses.m_AnisotropicWrapSampler ),
|
||||
nvrhi::BindingSetItem::Sampler( 1, commonPasses.m_LinearClampSampler )
|
||||
|
@ -456,8 +466,8 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
}
|
||||
else
|
||||
{
|
||||
desc[1].bindings[0].resourceHandle = commonPasses.m_AnisotropicWrapSampler;
|
||||
desc[1].bindings[1].resourceHandle = commonPasses.m_LinearClampSampler;
|
||||
desc[2].bindings[0].resourceHandle = commonPasses.m_AnisotropicWrapSampler;
|
||||
desc[2].bindings[1].resourceHandle = commonPasses.m_LinearClampSampler;
|
||||
}
|
||||
}
|
||||
else if( type == BINDING_LAYOUT_DRAW_AO )
|
||||
|
@ -515,9 +525,7 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
nvrhi::BindingSetItem::ConstantBuffer( 0, renderProgManager.ConstantBuffer() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 0, ( nvrhi::ITexture* )GetImageAt( 0 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 1, ( nvrhi::ITexture* )GetImageAt( 1 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 2, ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 3, ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 4, ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID() )
|
||||
nvrhi::BindingSetItem::Texture_SRV( 2, ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID() )
|
||||
};
|
||||
}
|
||||
else
|
||||
|
@ -526,13 +534,25 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
desc[0].bindings[1].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 0 )->GetTextureID();
|
||||
desc[0].bindings[2].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 1 )->GetTextureID();
|
||||
desc[0].bindings[3].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID();
|
||||
desc[0].bindings[4].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID();
|
||||
desc[0].bindings[5].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID();
|
||||
}
|
||||
|
||||
if( desc[1].bindings.empty() )
|
||||
{
|
||||
desc[1].bindings =
|
||||
{
|
||||
nvrhi::BindingSetItem::Texture_SRV( 3, ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 4, ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID() )
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
desc[1].bindings[0].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID();
|
||||
desc[1].bindings[1].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID();
|
||||
}
|
||||
|
||||
if( desc[2].bindings.empty() )
|
||||
{
|
||||
desc[2].bindings =
|
||||
{
|
||||
nvrhi::BindingSetItem::Sampler( 0, commonPasses.m_AnisotropicWrapSampler ),
|
||||
nvrhi::BindingSetItem::Sampler( 1, commonPasses.m_LinearBorderSampler )
|
||||
|
@ -540,8 +560,8 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
}
|
||||
else
|
||||
{
|
||||
desc[1].bindings[0].resourceHandle = commonPasses.m_AnisotropicWrapSampler;
|
||||
desc[1].bindings[1].resourceHandle = commonPasses.m_LinearBorderSampler;
|
||||
desc[2].bindings[0].resourceHandle = commonPasses.m_AnisotropicWrapSampler;
|
||||
desc[2].bindings[1].resourceHandle = commonPasses.m_LinearBorderSampler;
|
||||
}
|
||||
}
|
||||
else if( type == BINDING_LAYOUT_DRAW_INTERACTION_SM )
|
||||
|
@ -553,7 +573,23 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
nvrhi::BindingSetItem::ConstantBuffer( 0, renderProgManager.ConstantBuffer() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 0, ( nvrhi::ITexture* )GetImageAt( 0 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 1, ( nvrhi::ITexture* )GetImageAt( 1 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 2, ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 2, ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID() )
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
auto& bindings = desc[0].bindings;
|
||||
bindings[0].resourceHandle = renderProgManager.ConstantBuffer();
|
||||
bindings[1].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 0 )->GetTextureID();
|
||||
bindings[2].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 1 )->GetTextureID();
|
||||
bindings[3].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID();
|
||||
}
|
||||
|
||||
if( desc[1].bindings.empty() )
|
||||
{
|
||||
auto& bindings = desc[1].bindings;
|
||||
bindings =
|
||||
{
|
||||
nvrhi::BindingSetItem::Texture_SRV( 3, ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 4, ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID() ),
|
||||
nvrhi::BindingSetItem::Texture_SRV( 5, ( nvrhi::ITexture* )GetImageAt( 5 )->GetTextureID() ),
|
||||
|
@ -562,19 +598,17 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
}
|
||||
else
|
||||
{
|
||||
desc[0].bindings[0].resourceHandle = renderProgManager.ConstantBuffer();
|
||||
desc[0].bindings[1].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 0 )->GetTextureID();
|
||||
desc[0].bindings[2].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 1 )->GetTextureID();
|
||||
desc[0].bindings[3].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 2 )->GetTextureID();
|
||||
desc[0].bindings[4].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID();
|
||||
desc[0].bindings[5].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID();
|
||||
desc[0].bindings[6].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 5 )->GetTextureID();
|
||||
desc[0].bindings[7].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 6 )->GetTextureID();
|
||||
auto& bindings = desc[1].bindings;
|
||||
bindings[0].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 3 )->GetTextureID();
|
||||
bindings[1].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 4 )->GetTextureID();
|
||||
bindings[2].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 5 )->GetTextureID();
|
||||
bindings[3].resourceHandle = ( nvrhi::ITexture* )GetImageAt( 6 )->GetTextureID();
|
||||
}
|
||||
|
||||
if( desc[1].bindings.empty() )
|
||||
if( desc[2].bindings.empty() )
|
||||
{
|
||||
desc[1].bindings =
|
||||
auto& bindings = desc[2].bindings;
|
||||
bindings =
|
||||
{
|
||||
nvrhi::BindingSetItem::Sampler( 0, commonPasses.m_AnisotropicWrapSampler ),
|
||||
nvrhi::BindingSetItem::Sampler( 1, commonPasses.m_LinearBorderSampler ),
|
||||
|
@ -584,10 +618,11 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
}
|
||||
else
|
||||
{
|
||||
desc[1].bindings[0].resourceHandle = commonPasses.m_AnisotropicWrapSampler;
|
||||
desc[1].bindings[1].resourceHandle = commonPasses.m_LinearBorderSampler;
|
||||
desc[1].bindings[2].resourceHandle = commonPasses.m_LinearClampCompareSampler;
|
||||
desc[1].bindings[3].resourceHandle = commonPasses.m_PointWrapSampler;
|
||||
auto& bindings = desc[2].bindings;
|
||||
bindings[0].resourceHandle = commonPasses.m_AnisotropicWrapSampler;
|
||||
bindings[1].resourceHandle = commonPasses.m_LinearBorderSampler;
|
||||
bindings[2].resourceHandle = commonPasses.m_LinearClampCompareSampler;
|
||||
bindings[3].resourceHandle = commonPasses.m_PointWrapSampler;
|
||||
}
|
||||
}
|
||||
else if( type == BINDING_LAYOUT_DRAW_FOG )
|
||||
|
|
|
@ -127,7 +127,7 @@ void idRenderProgManager::LoadShader( shader_t& shader )
|
|||
}
|
||||
else
|
||||
{
|
||||
common->FatalError( "Unsuported graphics api" );
|
||||
common->FatalError( "Unsupported graphics api" );
|
||||
}
|
||||
|
||||
ShaderBlob shaderBlob = GetBytecode( adjustedName );
|
||||
|
|
|
@ -85,7 +85,7 @@ static void R_ReloadShaders( const idCmdArgs& args )
|
|||
idRenderProgManager::Init()
|
||||
================================================================================================
|
||||
*/
|
||||
void idRenderProgManager::Init( nvrhi::IDevice* _device )
|
||||
void idRenderProgManager::Init( nvrhi::IDevice* device )
|
||||
{
|
||||
common->Printf( "----- Initializing Render Shaders -----\n" );
|
||||
|
||||
|
@ -95,7 +95,7 @@ void idRenderProgManager::Init( nvrhi::IDevice* _device )
|
|||
}
|
||||
|
||||
#if defined( USE_NVRHI )
|
||||
device = _device;
|
||||
this->device = device;
|
||||
|
||||
uniforms.SetNum( RENDERPARM_TOTAL, vec4_zero );
|
||||
uniformsChanged = false;
|
||||
|
@ -106,7 +106,7 @@ void idRenderProgManager::Init( nvrhi::IDevice* _device )
|
|||
c_MaxRenderPassConstantBufferVersions ) );
|
||||
|
||||
// === Main draw vertex layout ===
|
||||
vertexLayoutDescs.SetNum( NUM_VERTEX_LAYOUTS, idList<nvrhi::VertexAttributeDesc>() );
|
||||
vertexLayoutDescs.SetNum( NUM_VERTEX_LAYOUTS, {} );
|
||||
|
||||
vertexLayoutDescs[LAYOUT_DRAW_VERT].Append(
|
||||
nvrhi::VertexAttributeDesc()
|
||||
|
@ -192,12 +192,17 @@ void idRenderProgManager::Init( nvrhi::IDevice* _device )
|
|||
|
||||
bindingLayouts[BINDING_LAYOUT_CONSTANT_BUFFER_ONLY] = { device->createBindingLayout( constantBufferLayoutDesc ) };
|
||||
|
||||
auto defaultMaterialLayoutDesc = nvrhi::BindingLayoutDesc()
|
||||
.setVisibility( nvrhi::ShaderType::All )
|
||||
.addItem( nvrhi::BindingLayoutItem::VolatileConstantBuffer( 0 ) )
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 0 ) ) // normal
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 1 ) ) // specular
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 2 ) ); // base color
|
||||
|
||||
auto defaultMaterialLayout = device->createBindingLayout( defaultMaterialLayoutDesc );
|
||||
|
||||
auto ambientIblLayoutDesc = nvrhi::BindingLayoutDesc()
|
||||
.setVisibility( nvrhi::ShaderType::All )
|
||||
.addItem( nvrhi::BindingLayoutItem::VolatileConstantBuffer( 0 ) )
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 0 ) ) // normal
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 1 ) ) // specular
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 2 ) ) // base color
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 3 ) ) // brdf lut
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 4 ) ) // ssao
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 7 ) ) // irradiance cube map
|
||||
|
@ -211,7 +216,10 @@ void idRenderProgManager::Init( nvrhi::IDevice* _device )
|
|||
.addItem( nvrhi::BindingLayoutItem::Sampler( 1 ) ); // (Clamp) Linear sampler: brdf lut sampler & ssao sampler
|
||||
auto samplerTwoBindingLayout = device->createBindingLayout( samplerTwoBindingLayoutDesc );
|
||||
|
||||
bindingLayouts[BINDING_LAYOUT_AMBIENT_LIGHTING_IBL] = { device->createBindingLayout( ambientIblLayoutDesc ), samplerTwoBindingLayout };
|
||||
bindingLayouts[ BINDING_LAYOUT_AMBIENT_LIGHTING_IBL ] =
|
||||
{
|
||||
defaultMaterialLayout, device->createBindingLayout( ambientIblLayoutDesc ), samplerTwoBindingLayout
|
||||
};
|
||||
|
||||
auto blitLayoutDesc = nvrhi::BindingLayoutDesc()
|
||||
.setVisibility( nvrhi::ShaderType::All )
|
||||
|
@ -245,21 +253,13 @@ void idRenderProgManager::Init( nvrhi::IDevice* _device )
|
|||
|
||||
auto interactionBindingLayout = nvrhi::BindingLayoutDesc()
|
||||
.setVisibility( nvrhi::ShaderType::All )
|
||||
.addItem( nvrhi::BindingLayoutItem::VolatileConstantBuffer( 0 ) )
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 0 ) ) // normal
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 1 ) ) // specular
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 2 ) ) // base color
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 3 ) ) // light falloff
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 4 ) ); // light projection
|
||||
|
||||
bindingLayouts[BINDING_LAYOUT_DRAW_INTERACTION] = { device->createBindingLayout( interactionBindingLayout ), samplerTwoBindingLayout };
|
||||
bindingLayouts[BINDING_LAYOUT_DRAW_INTERACTION] = { defaultMaterialLayout, device->createBindingLayout( interactionBindingLayout ), samplerTwoBindingLayout };
|
||||
|
||||
auto interactionSmBindingLayout = nvrhi::BindingLayoutDesc()
|
||||
.setVisibility( nvrhi::ShaderType::All )
|
||||
.addItem( nvrhi::BindingLayoutItem::VolatileConstantBuffer( 0 ) )
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 0 ) ) // normal
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 1 ) ) // specular
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 2 ) ) // base color
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 3 ) ) // light falloff
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 4 ) ) // light projection
|
||||
.addItem( nvrhi::BindingLayoutItem::Texture_SRV( 5 ) ) // shadow map array
|
||||
|
@ -273,7 +273,7 @@ void idRenderProgManager::Init( nvrhi::IDevice* _device )
|
|||
.addItem( nvrhi::BindingLayoutItem::Sampler( 3 ) ); // blue noise for shadow jitter
|
||||
auto samplerFourBindingLayout = device->createBindingLayout( samplerFourBindingLayoutDesc );
|
||||
|
||||
bindingLayouts[BINDING_LAYOUT_DRAW_INTERACTION_SM] = { device->createBindingLayout( interactionSmBindingLayout ), samplerFourBindingLayout };
|
||||
bindingLayouts[BINDING_LAYOUT_DRAW_INTERACTION_SM] = { defaultMaterialLayout, device->createBindingLayout( interactionSmBindingLayout ), samplerFourBindingLayout };
|
||||
|
||||
auto fogBindingLayout = nvrhi::BindingLayoutDesc()
|
||||
.setVisibility( nvrhi::ShaderType::All )
|
||||
|
|
|
@ -432,7 +432,7 @@ public:
|
|||
idRenderProgManager();
|
||||
virtual ~idRenderProgManager();
|
||||
|
||||
void Init( nvrhi::IDevice* _device );
|
||||
void Init( nvrhi::IDevice* device );
|
||||
void Shutdown();
|
||||
|
||||
void StartFrame();
|
||||
|
|
|
@ -2234,6 +2234,9 @@ idRenderSystemLocal::BeginLevelLoad
|
|||
*/
|
||||
void idRenderSystemLocal::BeginLevelLoad()
|
||||
{
|
||||
// clear binding sets for previous level images and light data #676
|
||||
backend.ClearCaches();
|
||||
|
||||
globalImages->BeginLevelLoad();
|
||||
renderModelManager->BeginLevelLoad();
|
||||
|
||||
|
|
|
@ -35,16 +35,16 @@ If you have questions concerning this license or the applicable additional terms
|
|||
Texture2D t_Normal : register( t0 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_Specular : register( t1 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_BaseColor : register( t2 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_BrdfLut : register( t3 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_Ssao : register( t4 VK_DESCRIPTOR_SET( 0 ) );
|
||||
|
||||
Texture2D t_IrradianceCubeMap : register( t7 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_RadianceCubeMap1 : register( t8 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_RadianceCubeMap2 : register( t9 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_RadianceCubeMap3 : register( t10 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_BrdfLut : register( t3 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_Ssao : register( t4 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_IrradianceCubeMap : register( t7 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_RadianceCubeMap1 : register( t8 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_RadianceCubeMap2 : register( t9 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_RadianceCubeMap3 : register( t10 VK_DESCRIPTOR_SET( 1 ) );
|
||||
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 1 ) ); // (Wrap) Anisotropic sampler: normal sampler & specular sampler
|
||||
SamplerState s_LinearClamp : register( s1 VK_DESCRIPTOR_SET( 1 ) ); // (Clamp) Linear sampler: brdf lut sampler & ssao sampler
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 2 ) ); // (Wrap) Anisotropic sampler: normal sampler & specular sampler
|
||||
SamplerState s_LinearClamp : register( s1 VK_DESCRIPTOR_SET( 2 ) ); // (Clamp) Linear sampler: brdf lut sampler & ssao sampler
|
||||
//SamplerState s_Light : register( s2 VK_DESCRIPTOR_SET( 1 )); // (Clamp) Anisotropic sampler: irradiance, radiance 1, 2 and 3.
|
||||
|
||||
struct PS_IN
|
||||
|
|
|
@ -36,17 +36,17 @@ If you have questions concerning this license or the applicable additional terms
|
|||
Texture2D t_Normal : register( t0 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_Specular : register( t1 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_BaseColor : register( t2 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_BrdfLut : register( t3 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_Ssao : register( t4 VK_DESCRIPTOR_SET( 0 ) );
|
||||
|
||||
Texture2D t_IrradianceCubeMap : register( t7 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_RadianceCubeMap1 : register( t8 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_RadianceCubeMap2 : register( t9 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_RadianceCubeMap3 : register( t10 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_BrdfLut : register( t3 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_Ssao : register( t4 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_IrradianceCubeMap : register( t7 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_RadianceCubeMap1 : register( t8 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_RadianceCubeMap2 : register( t9 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_RadianceCubeMap3 : register( t10 VK_DESCRIPTOR_SET( 1 ) );
|
||||
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 1 ) ); // (Wrap) Anisotropic sampler: normal sampler & specular sampler
|
||||
SamplerState s_LinearClamp : register( s1 VK_DESCRIPTOR_SET( 1 ) ); // (Clamp) Linear sampler: brdf lut sampler & ssao sampler
|
||||
//SamplerState s_Light : register( s2 VK_DESCRIPTOR_SET( 1 )); // (Clamp) Anisotropic sampler: irradiance, radiance 1, 2 and 3.
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 2 ) ); // (Wrap) Anisotropic sampler: normal sampler & specular sampler
|
||||
SamplerState s_LinearClamp : register( s1 VK_DESCRIPTOR_SET( 2 ) ); // (Clamp) Linear sampler: brdf lut sampler & ssao sampler
|
||||
//SamplerState s_Light : register( s2 VK_DESCRIPTOR_SET( 2 )); // (Clamp) Anisotropic sampler: irradiance, radiance 1, 2 and 3.
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
|
|
|
@ -35,23 +35,24 @@ If you have questions concerning this license or the applicable additional terms
|
|||
Texture2D t_Normal : register( t0 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_Specular : register( t1 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_BaseColor : register( t2 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_LightFalloff : register( t3 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_LightProjection : register( t4 VK_DESCRIPTOR_SET( 0 ) );
|
||||
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 1 ) ); // for the normal/specular/basecolor
|
||||
SamplerState s_Lighting : register( s1 VK_DESCRIPTOR_SET( 1 ) ); // for sampling the jitter
|
||||
Texture2D t_LightFalloff : register( t3 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_LightProjection : register( t4 VK_DESCRIPTOR_SET( 1 ) );
|
||||
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 2 ) ); // for the normal/specular/basecolor
|
||||
SamplerState s_Lighting : register( s1 VK_DESCRIPTOR_SET( 2 ) ); // for sampling the jitter
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 position : SV_Position;
|
||||
float4 texcoord0 : TEXCOORD0_centroid;
|
||||
float4 texcoord1 : TEXCOORD1_centroid;
|
||||
float4 texcoord2 : TEXCOORD2_centroid;
|
||||
float4 texcoord3 : TEXCOORD3_centroid;
|
||||
float4 texcoord4 : TEXCOORD4_centroid;
|
||||
float4 texcoord5 : TEXCOORD5_centroid;
|
||||
float4 texcoord6 : TEXCOORD6_centroid;
|
||||
float4 color : COLOR0;
|
||||
float4 texcoord0 : TEXCOORD0_centroid;
|
||||
float4 texcoord1 : TEXCOORD1_centroid;
|
||||
float4 texcoord2 : TEXCOORD2_centroid;
|
||||
float4 texcoord3 : TEXCOORD3_centroid;
|
||||
float4 texcoord4 : TEXCOORD4_centroid;
|
||||
float4 texcoord5 : TEXCOORD5_centroid;
|
||||
float4 texcoord6 : TEXCOORD6_centroid;
|
||||
float4 color : COLOR0;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
|
|
|
@ -34,11 +34,12 @@ If you have questions concerning this license or the applicable additional terms
|
|||
Texture2D t_Normal : register( t0 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_Specular : register( t1 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_BaseColor : register( t2 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_LightFalloff : register( t3 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_LightProjection : register( t4 VK_DESCRIPTOR_SET( 0 ) );
|
||||
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 1 ) ); // for the normal/specular/basecolor
|
||||
SamplerState s_Lighting : register( s1 VK_DESCRIPTOR_SET( 1 ) ); // for sampling the jitter
|
||||
Texture2D t_LightFalloff : register( t3 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_LightProjection : register( t4 VK_DESCRIPTOR_SET( 1 ) );
|
||||
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 2 ) ); // for the normal/specular/basecolor
|
||||
SamplerState s_Lighting : register( s1 VK_DESCRIPTOR_SET( 2 ) ); // for sampling the jitter
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
|
|
|
@ -36,19 +36,20 @@ If you have questions concerning this license or the applicable additional terms
|
|||
Texture2D t_Normal : register( t0 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_Specular : register( t1 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_BaseColor : register( t2 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_LightFalloff : register( t3 VK_DESCRIPTOR_SET( 0 ) );
|
||||
Texture2D t_LightProjection : register( t4 VK_DESCRIPTOR_SET( 0 ) );
|
||||
#if USE_SHADOW_ATLAS
|
||||
Texture2D t_ShadowAtlas : register( t5 VK_DESCRIPTOR_SET( 0 ) );
|
||||
#else
|
||||
Texture2DArray<float> t_ShadowMapArray : register( t5 VK_DESCRIPTOR_SET( 0 ) );
|
||||
#endif
|
||||
Texture2D t_Jitter : register( t6 VK_DESCRIPTOR_SET( 0 ) );
|
||||
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 1 ) ); // for the normal/specular/basecolor
|
||||
SamplerState s_Lighting : register( s1 VK_DESCRIPTOR_SET( 1 ) ); // for sampling the jitter
|
||||
SamplerComparisonState s_Shadow : register( s2 VK_DESCRIPTOR_SET( 1 ) ); // for the depth shadow map sampler with a compare function
|
||||
SamplerState s_Jitter : register( s3 VK_DESCRIPTOR_SET( 1 ) ); // for sampling the jitter
|
||||
Texture2D t_LightFalloff : register( t3 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_LightProjection : register( t4 VK_DESCRIPTOR_SET( 1 ) );
|
||||
#if USE_SHADOW_ATLAS
|
||||
Texture2D t_ShadowAtlas : register( t5 VK_DESCRIPTOR_SET( 1 ) );
|
||||
#else
|
||||
Texture2DArray<float> t_ShadowMapArray : register( t5 VK_DESCRIPTOR_SET( 1 ) );
|
||||
#endif
|
||||
Texture2D t_Jitter : register( t6 VK_DESCRIPTOR_SET( 1 ) );
|
||||
|
||||
SamplerState s_Material : register( s0 VK_DESCRIPTOR_SET( 2 ) ); // for the normal/specular/basecolor
|
||||
SamplerState s_Lighting : register( s1 VK_DESCRIPTOR_SET( 2 ) ); // for sampling the jitter
|
||||
SamplerComparisonState s_Shadow : register( s2 VK_DESCRIPTOR_SET( 2 ) ); // for the depth shadow map sampler with a compare function
|
||||
SamplerState s_Jitter : register( s3 VK_DESCRIPTOR_SET( 2 ) ); // for sampling the jitter
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
|
|
|
@ -29,16 +29,15 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
#include "global_inc.hlsl"
|
||||
|
||||
// *INDENT-OFF*
|
||||
|
||||
#if USE_GPU_SKINNING
|
||||
cbuffer CB :
|
||||
register( b1 )
|
||||
cbuffer CB : register( b1 )
|
||||
{
|
||||
float4 matrices[408];
|
||||
};
|
||||
#endif
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
REM 7z a RBDOOM-3-BFG-1.3.1.1-lite-win64-20220109-git-xxxxxxx.7z -r base/env/ base/maps/*.lightgrid base/maps/*_extra_ents.map -x!generated
|
||||
set filename=RBDOOM-3-BFG-1.5.0.1-lite-win64-20220529-git-xxxxxxx.7z
|
||||
7z a %filename% README.md RELEASE-NOTES.md base/devtools.cfg base/modelviewer.cfg base/extract_resources.cfg base/convert_maps_to_valve220.cfg base/def/*.def base/materials/*.mtr base/textures/common base/textures/editor base/maps/zoomaps -x!generated -xr!autosave -xr!*.xcf -xr!*.blend
|
||||
7z a %filename% README.md RELEASE-NOTES.md base/renderprogs2/dxil/*.bin
|
||||
7z a %filename% README.md RELEASE-NOTES.md -r base/renderprogs2/dxil/*.bin
|
||||
7z a %filename% README.md RELEASE-NOTES.md base/_tb/fgd/*.fgd
|
||||
7z a %filename% README.md RELEASE-NOTES.md tools/trenchbroom -xr!TrenchBroom-nomanual* -xr!TrenchBroom.pdb
|
||||
pause
|
||||
|
|
Loading…
Reference in a new issue