Skip to content

move transformations to Vertex Shader #10

Description

@lennart

the current fragment shader implementations for plane, circle and tri does really stupid and inefficient 2d-collision detection to rotate objects. this can be simplified by simply rotating scaling and translating the vertices in the vertex shader stage.

However, one has to take care of the following things for images:

  • need to use scaled and rotated texture coordinates
  • should be drawn on an infinite plane to show clamping when scaled down (e.g. see mirrored repeat to make a nice pattern, or crazy effects from clamp to edge )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions