Module re_renderer::transform

source ·
Expand description

Transformation utilities.

Some space definitions to keep in mind:

Texture coordinates:

  • origin top left
  • full texture ([left; right], [top; bottom]): ([0; 1], [0; 1])

NDC:

  • origin center
  • full screen ([left; right], [top; bottom]): ([-1; 1], [1; -1])

Pixel coordinates:

  • origin top left
  • full screen ([left; right], [top; bottom]): ([0; screen_extent.x], [0; screen_extent.y])

Structs§

  • Defines a transformation from a rectangular region of interest into a rectangular target region.

Functions§

  • Transforms texture coordinates to normalized device coordinates (NDC).
  • Transforms texture coordinates to normalized device coordinates (NDC).