Skip to content

Commit

Permalink
Fix erroneous cumulative transparency incrementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ifreund committed Jul 9, 2019
1 parent 5b20d45 commit 0ae920b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/shadowcasting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static void split_span( std::list<span<T>> &spans, typename std::list<span<T>>::
// Emit the D span if present, placing it after the current span in the list
if( leading_edge_major < this_span->end_major ) {
// Pass true to the span constructor to set skip_first_row to true
// This prevents the same row we are currently checking being check by the
// This prevents the same row we are currently checking being checked by the
// new D span
spans.emplace( std::next( this_span ),
leading_edge_major, this_span->end_major,
Expand All @@ -143,7 +143,6 @@ static void split_span( std::list<span<T>> &spans, typename std::list<span<T>>::
// The new span starts at the leading edge of the previous square if it is opaque,
// and at the trailing edge of the current square if it is transparent.
this_span->start_minor = new_start_minor;
this_span->cumulative_value = next_cumulative_transparency;

new_start_minor = leading_edge_minor;
current_transparency = new_transparency;
Expand Down

0 comments on commit 0ae920b

Please sign in to comment.