Skip to content

Commit

Permalink
fix: flip issues
Browse files Browse the repository at this point in the history
  • Loading branch information
beatreichenbach committed Apr 28, 2023
1 parent 7124716 commit 46ff14b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions realflare/api/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def flare(self, project: Project) -> None:
# get position of center of sample
position = QtCore.QPointF(
(x + 0.5) / half_width - 1,
(y + 0.5) / half_height - 1,
1 - (y + 0.5) / half_height,
)
project.flare.light_position = position
rays = self.raytracing_task.run(
Expand All @@ -164,11 +164,11 @@ def flare(self, project: Project) -> None:
)
flare_array = flare.array[:, :, :3]
image_array += values[0] * flare_array
np.flip(flare_array, 0)
flare_array = np.flip(flare_array, 0)
image_array += values[1] * flare_array
np.flip(flare_array, 1)
flare_array = np.flip(flare_array, 1)
image_array += values[2] * flare_array
np.flip(flare_array, 0)
flare_array = np.flip(flare_array, 0)
image_array += values[3] * flare_array
image_array /= width * height

Expand Down

0 comments on commit 46ff14b

Please sign in to comment.