File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -424,6 +424,7 @@ void Drawer::edl()
424
424
425
425
const float zNear = 1 ;
426
426
const float zFar = 10000 ;
427
+ const float logzFar = std::log2 (zFar);
427
428
428
429
std::vector<GLfloat> worldLogDistances (width * height);
429
430
for (int i = 0 ; i < width * height; ++i)
@@ -455,9 +456,12 @@ void Drawer::edl()
455
456
for (int x = 0 ; x < width; ++x)
456
457
{
457
458
int idx = y * width + x;
459
+ float wld = worldLogDistances[idx];
460
+
461
+ if (wld == logzFar) { continue ; }
458
462
459
463
// Find the maximum log depth among neighbors
460
- GLfloat maxLogDepth = std::max (0 .0f , worldLogDistances[idx] );
464
+ GLfloat maxLogDepth = std::max (0 .0f , wld );
461
465
462
466
// Compute the response for the current pixel
463
467
GLfloat sum = 0 .0f ;
You can’t perform that action at this time.
0 commit comments