Restored internal envprobe fallback if map has no envprobes. close #836

This commit is contained in:
Robert Beckebans 2024-05-01 11:37:34 +02:00
parent 7d0f68b9d5
commit 4357e0f7a3
2 changed files with 4 additions and 1 deletions

View file

@ -585,6 +585,9 @@ void idImage::FinalizeImage( bool fromBackEnd, nvrhi::ICommandList* commandList
AllocImage();
// default it again because it was unset by AllocImage().PurgeImage()
defaulted = true;
// clear the data so it's not left uninitialized
idTempArray<byte> clear( opts.width * opts.height * 4 );
memset( clear.Ptr(), 0, clear.Size() );

View file

@ -532,7 +532,7 @@ static void R_FindClosestEnvironmentProbes()
RenderEnvprobeLocal* nearest = viewEnvprobes[0];
tr.viewDef->globalProbeBounds = nearest->globalProbeBounds;
if( !nearest->irradianceImage->IsDefaulted() )
if( nearest->irradianceImage->IsLoaded() && !nearest->irradianceImage->IsDefaulted() )
{
tr.viewDef->irradianceImage = nearest->irradianceImage;
}