Skip to content

Commit

Permalink
fix y minimum limit bug in ImageRendererSDF2
Browse files Browse the repository at this point in the history
  • Loading branch information
soypat committed Aug 30, 2024
1 parent 57c8f9e commit 8e5acea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glrender/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (ir *ImageRendererSDF2) Render(sdf gleval.SDF2, img setImage, userData any)
for j := 0; j < dyi; j++ {
// y is inverted in the image interface, maximum index (maxI, maxJ) represents upper left corner.
// See [image.At] method so we must invert y here.
y := bb.Max.Y - (float32(j)*dy + bb.Min.Y)
y := bb.Max.Y - float32(j)*dy
err := ir.renderRow(sdf, j, y, bb.Min.X, dx, imgBB, img, userData)
if err != nil {
return err
Expand Down

0 comments on commit 8e5acea

Please sign in to comment.