Luminol icon indicating copy to clipboard operation
Luminol copied to clipboard

Viewport transformation efficiency

Open white-axe opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. Luminol's shaders have a 4D viewport transformation matrix. This is totally unnecessary because all we ever do to the viewport is translate and scale it.

Describe the solution you'd like Replace the 4D viewport matrices with two vec2<f32>s: one that represents the position of the viewport and another that represents the scale along the X- and Y-axes.

Describe alternatives you've considered If we need to do more than just translations and scaling to the viewport, we can use a 3D transformation matrix instead of a 4D one. A 3D transformation matrix is enough to encode any 2D affine transformation, a 4D transformation matrix is only required for 3D affine transformations.

white-axe avatar Feb 03 '24 05:02 white-axe