From cfef45c93be67b8bc75f82b70adf968c5ec663cd Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Sat, 4 Mar 2023 14:11:18 +0100 Subject: [PATCH] Introduce a view-matrix for ShaderVG --- gui/shaders/canvas-pipeline.vert | 1 + gui/shaders/canvas-user-default.vert | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/shaders/canvas-pipeline.vert b/gui/shaders/canvas-pipeline.vert index 5c0937daf..4ee82bee2 100644 --- a/gui/shaders/canvas-pipeline.vert +++ b/gui/shaders/canvas-pipeline.vert @@ -4,6 +4,7 @@ /*** Input *******************/ in vec2 pos; in vec2 textureUV; +uniform mat4 sh_View; uniform mat4 sh_Model; uniform mat4 sh_Ortho; uniform mat3 paintInverted; diff --git a/gui/shaders/canvas-user-default.vert b/gui/shaders/canvas-user-default.vert index 763e640d0..03c2d6d98 100644 --- a/gui/shaders/canvas-user-default.vert +++ b/gui/shaders/canvas-user-default.vert @@ -1,6 +1,6 @@ // -*-C++-*- void shMain() { - gl_Position = sh_Ortho * sh_Model * sh_Vertex; + gl_Position = sh_Ortho * sh_View * sh_Model * sh_Vertex; }