File tree 2 files changed +12
-11
lines changed
2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -50,21 +50,21 @@ private void Load(int tileIndexX, int tileIndexY)
50
50
long tileIndex = ( ( long ) tileIndexY << 32 ) + tileIndexX ;
51
51
if ( ! tiles . ContainsKey ( tileIndex ) )
52
52
{
53
- bool fileExists = true ;
54
- string [ ] fileList = null ;
53
+ string foundFileName = null ;
55
54
string fileNameBase = tileIndexX + "_" + tileIndexY + "_" + Zoom ;
56
- if ( Directory . Exists ( cacheDir ) )
55
+ if ( Config . Data . enableCaching )
57
56
{
58
- fileList = Directory . GetFiles ( cacheDir , fileNameBase + ".*" ) ;
59
- if ( fileList . Length == 0 )
60
- fileExists = false ;
57
+ if ( Directory . Exists ( cacheDir ) )
58
+ {
59
+ string [ ] fileList = Directory . GetFiles ( cacheDir , fileNameBase + ".*" ) ;
60
+ if ( fileList . Length != 0 )
61
+ foundFileName = fileList [ 0 ] ;
62
+ }
61
63
}
62
- else
63
- fileExists = false ;
64
64
65
65
byte [ ] data ;
66
- if ( Config . Data . enableCaching && fileExists )
67
- data = File . ReadAllBytes ( fileList [ 0 ] ) ;
66
+ if ( foundFileName != null )
67
+ data = File . ReadAllBytes ( foundFileName ) ;
68
68
else
69
69
{
70
70
data = imageSource . GetTile ( tileIndexX , tileIndexY , Zoom ) ;
Original file line number Diff line number Diff line change @@ -200,7 +200,8 @@ public Tracer()
200
200
}
201
201
} ) ;
202
202
203
- int integrateSamples = ( int ) ( riverWidthPx * Config . Data . noiseReduction ) ;
203
+ int integrateSamples = ( int ) ( riverWidthPx *
204
+ Config . Data . resamplingFactor * Config . Data . noiseReduction ) ;
204
205
if ( integrateSamples % 2 == 0 )
205
206
integrateSamples ++ ;
206
207
anglesGrid = Integrate ( anglesGrid , integrateSamples ) ;
You can’t perform that action at this time.
0 commit comments