mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Fixed problem with spot light projections #673
This commit is contained in:
parent
547bffce82
commit
ef72010b01
8 changed files with 18 additions and 14 deletions
|
@ -4,7 +4,7 @@
|
|||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
Copyright (C) 2013 Robert Beckebans
|
||||
Copyright (C) 2016-2017 Stephen Pridham
|
||||
Copyright (C) 2022 Stephen Pridham
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
===========================================================================
|
||||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 2014-2020 Robert Beckebans
|
||||
Copyright (C) 2014-2022 Robert Beckebans
|
||||
Copyright (C) 2022 Stephen Pridham
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
Copyright (C) 2013-2016 Robert Beckebans
|
||||
Copyright (C) 2013-2022 Robert Beckebans
|
||||
Copyright (C) 2022 Stephen Pridham
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
Copyright (C) 2013-2019 Robert Beckebans
|
||||
Copyright (C) 2013-2022 Robert Beckebans
|
||||
Copyright (C) 2016-2017 Dustin Land
|
||||
Copyright (C) 2022 Stephen Pridham
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
|
@ -534,13 +535,13 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
desc[1].bindings =
|
||||
{
|
||||
nvrhi::BindingSetItem::Sampler( 0, commonPasses.m_AnisotropicWrapSampler ),
|
||||
nvrhi::BindingSetItem::Sampler( 1, commonPasses.m_LinearClampSampler )
|
||||
nvrhi::BindingSetItem::Sampler( 1, commonPasses.m_LinearBorderSampler )
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
desc[1].bindings[0].resourceHandle = commonPasses.m_AnisotropicWrapSampler;
|
||||
desc[1].bindings[1].resourceHandle = commonPasses.m_LinearClampSampler;
|
||||
desc[1].bindings[1].resourceHandle = commonPasses.m_LinearBorderSampler;
|
||||
}
|
||||
}
|
||||
else if( type == BINDING_LAYOUT_DRAW_INTERACTION_SM )
|
||||
|
@ -576,7 +577,7 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
desc[1].bindings =
|
||||
{
|
||||
nvrhi::BindingSetItem::Sampler( 0, commonPasses.m_AnisotropicWrapSampler ),
|
||||
nvrhi::BindingSetItem::Sampler( 1, commonPasses.m_LinearClampSampler ),
|
||||
nvrhi::BindingSetItem::Sampler( 1, commonPasses.m_LinearBorderSampler ),
|
||||
nvrhi::BindingSetItem::Sampler( 2, commonPasses.m_LinearClampCompareSampler ),
|
||||
nvrhi::BindingSetItem::Sampler( 3, commonPasses.m_PointWrapSampler ) // blue noise
|
||||
};
|
||||
|
@ -584,7 +585,7 @@ void idRenderBackend::GetCurrentBindingLayout( int type )
|
|||
else
|
||||
{
|
||||
desc[1].bindings[0].resourceHandle = commonPasses.m_AnisotropicWrapSampler;
|
||||
desc[1].bindings[1].resourceHandle = commonPasses.m_LinearClampSampler;
|
||||
desc[1].bindings[1].resourceHandle = commonPasses.m_LinearBorderSampler;
|
||||
desc[1].bindings[2].resourceHandle = commonPasses.m_LinearClampCompareSampler;
|
||||
desc[1].bindings[3].resourceHandle = commonPasses.m_PointWrapSampler;
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
Copyright (C) 2014-2022 Robert Beckebans
|
||||
Copyright (C) 2014-2016 Kot in Action Creative Artel
|
||||
Copyright (C) 2016-2017 Dustin Land
|
||||
Copyright (C) 2022 Stephen Pridham
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
Copyright (C) 2013-2018 Robert Beckebans
|
||||
Copyright (C) 2013-2022 Robert Beckebans
|
||||
Copyright (C) 2022 Stephen Pridham
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
@ -36,8 +36,6 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include <sys/DeviceManager.h>
|
||||
|
||||
|
||||
idCVar r_displayGLSLCompilerMessages( "r_displayGLSLCompilerMessages", "1", CVAR_BOOL | CVAR_ARCHIVE, "Show info messages the GPU driver outputs when compiling the shaders" );
|
||||
idCVar r_alwaysExportGLSL( "r_alwaysExportGLSL", "1", CVAR_BOOL, "" );
|
||||
|
||||
/*
|
||||
========================
|
||||
|
|
|
@ -80,6 +80,10 @@ void CommonRenderPasses::Init( nvrhi::IDevice* device )
|
|||
samplerDesc.setAllFilters( true );
|
||||
m_LinearClampSampler = m_Device->createSampler( samplerDesc );
|
||||
|
||||
samplerDesc.setAllAddressModes( nvrhi::SamplerAddressMode::Border );
|
||||
samplerDesc.setBorderColor( nvrhi::Color( 0.f, 0.f, 0.f, 1.f ) );
|
||||
m_LinearBorderSampler = m_Device->createSampler( samplerDesc );
|
||||
|
||||
samplerDesc.setReductionType( nvrhi::SamplerReductionType::Comparison );
|
||||
m_LinearClampCompareSampler = m_Device->createSampler( samplerDesc );
|
||||
|
||||
|
|
|
@ -107,8 +107,6 @@ protected:
|
|||
std::unordered_map<PsoCacheKey, nvrhi::GraphicsPipelineHandle, PsoCacheKey::Hash> m_BlitPsoCache;
|
||||
|
||||
public:
|
||||
//nvrhi::ShaderHandle m_FullscreenVS;
|
||||
//nvrhi::ShaderHandle m_FullscreenAtOneVS;
|
||||
nvrhi::ShaderHandle m_RectVS;
|
||||
nvrhi::ShaderHandle m_BlitPS;
|
||||
nvrhi::ShaderHandle m_BlitArrayPS;
|
||||
|
@ -125,6 +123,7 @@ public:
|
|||
nvrhi::SamplerHandle m_PointClampSampler;
|
||||
nvrhi::SamplerHandle m_PointWrapSampler;
|
||||
nvrhi::SamplerHandle m_LinearClampSampler;
|
||||
nvrhi::SamplerHandle m_LinearBorderSampler; // D3 zeroClamp
|
||||
nvrhi::SamplerHandle m_LinearClampCompareSampler;
|
||||
nvrhi::SamplerHandle m_LinearWrapSampler;
|
||||
nvrhi::SamplerHandle m_AnisotropicWrapSampler;
|
||||
|
|
Loading…
Reference in a new issue