mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
Lowered irradiance probe resolution to ( 16 + 2 )^2
This commit is contained in:
parent
f3ee2baac8
commit
8d1e7c5afd
5 changed files with 270 additions and 260 deletions
|
@ -108,7 +108,7 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
|
||||
// offset by one pixel border bleed size for linear filtering
|
||||
#if 1
|
||||
float2 octCoordNormalizedToTextureDimensions = ( normalizedOctCoordZeroOne * ( 32.0 / ( 34.0 * 1.0 ) ) );
|
||||
float2 octCoordNormalizedToTextureDimensions = ( normalizedOctCoordZeroOne * ( 16.0 / 18.0 ) );
|
||||
|
||||
float2 probeTopLeftPosition;
|
||||
probeTopLeftPosition.x = ( gridCoord[0] * gridStep[0] + gridCoord[2] * gridStep[1] ) * 2.0 + 1.0;
|
||||
|
|
|
@ -333,7 +333,7 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
|
||||
// offset by one pixel border bleed size for linear filtering
|
||||
#if 1
|
||||
float2 octCoordNormalizedToTextureDimensions = ( ( normalizedOctCoordZeroOne + atlasOffset ) * ( 32.0 / ( 34.0 * 1.0 ) ) );
|
||||
float2 octCoordNormalizedToTextureDimensions = ( ( normalizedOctCoordZeroOne + atlasOffset ) * ( 16.0 / 18.0 ) );
|
||||
|
||||
float2 probeTopLeftPosition;
|
||||
probeTopLeftPosition.x = ( gridCoord2[0] * gridStep[0] + gridCoord2[2] * gridStep[1] ) * 2.0 + 1.0;
|
||||
|
|
|
@ -513,7 +513,7 @@ struct calcEnvprobeParms_t
|
|||
|
||||
|
||||
|
||||
static const int LIGHTGRID_IRRADIANCE_SIZE = ( 16 * 2 ) + 2;
|
||||
static const int LIGHTGRID_IRRADIANCE_SIZE = ( 16 * 1 ) + 2;
|
||||
|
||||
struct calcLightGridPointParms_t
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -405,8 +405,16 @@ void idRenderWorldLocal::LoadLightGridImages()
|
|||
for( int i = 0; i < numPortalAreas; i++ )
|
||||
{
|
||||
portalArea_t* area = &portalAreas[i];
|
||||
filename.Format( "env/%s/area%i_lightgrid_amb", baseName.c_str(), i );
|
||||
area->lightGrid.irradianceImage = globalImages->ImageFromFile( filename, TF_LINEAR, TR_CLAMP, TD_R11G11B10F, CF_2D );
|
||||
|
||||
if( !area->lightGrid.irradianceImage )
|
||||
{
|
||||
filename.Format( "env/%s/area%i_lightgrid_amb", baseName.c_str(), i );
|
||||
area->lightGrid.irradianceImage = globalImages->ImageFromFile( filename, TF_LINEAR, TR_CLAMP, TD_R11G11B10F, CF_2D );
|
||||
}
|
||||
else
|
||||
{
|
||||
area->lightGrid.irradianceImage->Reload( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,6 +460,8 @@ void idRenderWorldLocal::WriteLightGridsToFile( const char* filename )
|
|||
|
||||
void idRenderWorldLocal::WriteLightGrid( idFile* fp, const LightGrid& lightGrid )
|
||||
{
|
||||
// TODO write used irradiance resolution
|
||||
|
||||
fp->WriteFloatString( "lightGridPoints { /* area = */ %i /* numLightGridPoints = */ %i\n", lightGrid.area, lightGrid.lightGridPoints.Num() );
|
||||
|
||||
fp->WriteFloatString( "/* gridMins */ " );
|
||||
|
|
Loading…
Reference in a new issue