Skip to content

Conversation

@avahe-kellenberger
Copy link

@avahe-kellenberger avahe-kellenberger commented Sep 3, 2022

Should resolve issues addressed in #220

  • GPU_Pixel now renders on the center of the pixel
  • GPU_Line renders from the center of pixels
  • GPU_Rectangle borders are now rendered inside the rectangle instead of being centered on the bounds

If any of these behavioral changes are unwanted, maybe we can introduce a way to allow the users to decide on the behavior. E.g. enums/booleans, new functions, etc.

Here's an illustration of the changes made to GPU_Rectangle:

image

  • The outer black rectangle represents the outer edges of the pixels
  • The inner red rectangle represents the inner edges of the pixels
  • The numbers are the indices of the vertexes of the triangles used to draw the rectangle sides

The function now uses an "inner-stroke" instead of trying to center the
lines of the rectangle onto its outer pixel coordinates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants