[core] Update icon shader code
Ported the following patch:
- [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
This commit is contained in:
@@ -100,7 +100,9 @@ void Painter::render(const Style& style, const FrameData& frame_, SpriteAtlas& a
|
||||
// The extrusion matrix.
|
||||
matrix::ortho(extrudeMatrix, 0, state.getWidth(), state.getHeight(), 0, 0, -1);
|
||||
|
||||
extrudeScale = {{ (2.0f / state.getWidth()) * state.getAltitude(), -2.0f / state.getHeight() * state.getAltitude() }};
|
||||
const float flippedY = state.getViewportMode() == ViewportMode::FlippedY;
|
||||
extrudeScale = {{ 2.0f / state.getWidth() * state.getAltitude(),
|
||||
(flippedY ? 2.0f : -2.0f) / state.getHeight() * state.getAltitude() }};
|
||||
|
||||
// The native matrix is a 1:1 matrix that paints the coordinates at the
|
||||
// same screen position as the vertex specifies.
|
||||
|
||||
Reference in New Issue
Block a user