From 5326f294ceb95f1b535d145b5fdbdc221f560d53 Mon Sep 17 00:00:00 2001 From: ccolin Date: Sun, 3 Jan 2021 19:55:04 +0100 Subject: add option to draw trajectories --- shaders/line.frag | 5 +++++ shaders/line.vert | 8 ++++++++ shaders/shaders_resources.qrc | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 shaders/line.frag create mode 100644 shaders/line.vert (limited to 'shaders') diff --git a/shaders/line.frag b/shaders/line.frag new file mode 100644 index 0000000..ba83ada --- /dev/null +++ b/shaders/line.frag @@ -0,0 +1,5 @@ +uniform vec3 color; + +void main() { + gl_FragColor = vec4(color, 1); +} diff --git a/shaders/line.vert b/shaders/line.vert new file mode 100644 index 0000000..b41673c --- /dev/null +++ b/shaders/line.vert @@ -0,0 +1,8 @@ +attribute vec3 in_pos; + +uniform mat4 proj; +uniform mat4 view; + +void main() { + gl_Position = proj * view * vec4(in_pos, 1.0); +} diff --git a/shaders/shaders_resources.qrc b/shaders/shaders_resources.qrc index 1dc5251..ea905c1 100644 --- a/shaders/shaders_resources.qrc +++ b/shaders/shaders_resources.qrc @@ -5,5 +5,7 @@ main.frag skybox.vert skybox.frag + line.vert + line.frag -- cgit v1.2.3-70-g09d2