diff options
author | David Robillard <d@drobilla.net> | 2021-01-02 21:09:27 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-01-02 21:09:27 +0100 |
commit | 1c365945ed2ebd5b9f54eb0c8c5c1c6d97cad712 (patch) | |
tree | 4b77266a9ce3e2a11b59bbd2754869c6ee1d172b /examples/shaders/rect.vert | |
parent | a92a194b4fc64e0cfa4a88a59e261f236414d61c (diff) | |
download | pugl-1c365945ed2ebd5b9f54eb0c8c5c1c6d97cad712.tar.gz pugl-1c365945ed2ebd5b9f54eb0c8c5c1c6d97cad712.tar.bz2 pugl-1c365945ed2ebd5b9f54eb0c8c5c1c6d97cad712.zip |
Simplify clang-format configuration and format all code
Diffstat (limited to 'examples/shaders/rect.vert')
-rw-r--r-- | examples/shaders/rect.vert | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/examples/shaders/rect.vert b/examples/shaders/rect.vert index 09f1917..2c7b5f1 100644 --- a/examples/shaders/rect.vert +++ b/examples/shaders/rect.vert @@ -3,8 +3,9 @@ UBO(binding = 0) uniform UniformBufferObject { - mat4 projection; -} ubo; + mat4 projection; +} +ubo; layout(location = 0) in vec2 v_position; layout(location = 1) in vec2 v_origin; @@ -18,18 +19,18 @@ INTER(location = 2) noperspective out vec4 f_fillColor; void main() { - // clang-format off - mat4 m = mat4(v_size[0], 0.0, 0.0, 0.0, - 0.0, v_size[1], 0.0, 0.0, - 0.0, 0.0, 1.0, 0.0, - v_origin[0], v_origin[1], 0.0, 1.0); - // clang-format on + // clang-format off + mat4 m = mat4(v_size[0], 0.0, 0.0, 0.0, + 0.0, v_size[1], 0.0, 0.0, + 0.0, 0.0, 1.0, 0.0, + v_origin[0], v_origin[1], 0.0, 1.0); + // clang-format on - mat4 MVP = ubo.projection * m; + mat4 MVP = ubo.projection * m; - f_uv = v_position * v_size; - f_size = v_size; - f_fillColor = v_fillColor; + f_uv = v_position * v_size; + f_size = v_size; + f_fillColor = v_fillColor; - gl_Position = MVP * vec4(v_position, 0.0, 1.0); + gl_Position = MVP * vec4(v_position, 0.0, 1.0); } |