Fixed r_useShadowAtlas 0

This commit is contained in:
Robert Beckebans 2023-03-14 23:55:37 +01:00
parent d846b54e72
commit 1e29c5e15d
2 changed files with 6 additions and 8 deletions

View file

@ -463,14 +463,11 @@ void idRenderBackend::DrawElementsWithCounters( const drawSurf_t* surf )
changeState = true;
}
#if 0
if( !currentScissor.Equals( stateScissor ) && r_useScissor.GetBool() )
if( !context.scissor.Equals( stateScissor ) )
{
changeState = true;
stateScissor = currentScissor;
stateScissor = context.scissor;
}
#endif
if( renderProgManager.CommitConstantBuffer( commandList, bindingLayoutType != prevBindingLayoutType ) )
{
@ -1686,6 +1683,7 @@ idRenderBackend::GL_Scissor
*/
void idRenderBackend::GL_Scissor( int x /* left*/, int y /* bottom */, int w, int h )
{
//vk::Rect2D;
// TODO Check if this is right.
context.scissor.Clear();
context.scissor.AddPoint( x, y );

View file

@ -1682,7 +1682,7 @@ void idRenderBackend::RenderInteractions( const drawSurf_t* surfList, const view
float jitterTexScale[4];
jitterTexScale[0] = r_shadowMapJitterScale.GetFloat() * jitterSampleScale; // TODO shadow buffer size fraction shadowMapSize / maxShadowMapSize
jitterTexScale[1] = r_shadowMapJitterScale.GetFloat() * jitterSampleScale;
jitterTexScale[2] = 1;
jitterTexScale[2] = vLight->shadowFadeOut;
jitterTexScale[3] = shadowMapSamples;
SetFragmentParm( RENDERPARM_JITTERTEXSCALE, jitterTexScale ); // rpJitterTexScale
}
@ -3657,7 +3657,7 @@ public:
void idRenderBackend::ShadowAtlasPass( const viewDef_t* _viewDef )
{
if( r_skipShadows.GetBool() || !r_useShadowAtlas.GetBool() || viewDef->viewLights == NULL )
if( r_skipShadows.GetBool() || !r_useShadowAtlas.GetBool() || !r_useShadowMapping.GetBool() || viewDef->viewLights == NULL )
{
return;
}
@ -4035,7 +4035,7 @@ void idRenderBackend::DrawInteractions( const viewDef_t* _viewDef )
// RB: shadow mapping
if( r_useShadowMapping.GetBool() )
{
if( !r_useShadowAtlas.GetBool() )
if( !r_useShadowAtlas.GetBool() && vLight->shadowLOD > -1 )
{
int side, sideStop;