diff options
author | ccolin | 2021-01-03 19:55:04 +0100 |
---|---|---|
committer | ccolin | 2021-01-03 19:55:04 +0100 |
commit | 5326f294ceb95f1b535d145b5fdbdc221f560d53 (patch) | |
tree | a5d9dee2ebfa6413aedd764e901f3df994888614 /shaders | |
parent | ec4017bb0ff221c5c3e192a165c8d60a54f3bedc (diff) |
add option to draw trajectories
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/line.frag | 5 | ||||
-rw-r--r-- | shaders/line.vert | 8 | ||||
-rw-r--r-- | shaders/shaders_resources.qrc | 2 |
3 files changed, 15 insertions, 0 deletions
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 @@ <file>main.frag</file> <file>skybox.vert</file> <file>skybox.frag</file> + <file>line.vert</file> + <file>line.frag</file> </qresource> </RCC> |