Commit b1f68ad5 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

SunLightBlending: calculate longitudes iteratively in loop, not from scratch

parent a92c7254
......@@ -104,14 +104,16 @@ void SunLightBlending::blend( QImage * const tileImage, TextureTile const * cons
cur_x += n;
continue;
}
qreal lon = lon_scale * (id.x() * tileWidth + cur_x);
for ( int t = 0; t < n ; ++t ) {
qreal lon = lon_scale * ( id.x() * tileWidth + cur_x );
shade = m_sunLocator->shading( lon, a, c );
m_sunLocator->shadePixelComposite( *scanline, *nscanline, shade );
++scanline;
++nscanline;
++cur_x;
lon += lon_scale;
}
cur_x += n;
}
else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment