From 376e1a7f9207fffb1ec3027ac1e7f32db5de4922 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sat, 6 Feb 2021 18:39:48 -0500 Subject: Initial commit --- frontend/_rigidbody/shaders/orthographic.frag | 5 +++++ frontend/_rigidbody/shaders/orthographic.vert | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 frontend/_rigidbody/shaders/orthographic.frag create mode 100644 frontend/_rigidbody/shaders/orthographic.vert (limited to 'frontend/_rigidbody/shaders') diff --git a/frontend/_rigidbody/shaders/orthographic.frag b/frontend/_rigidbody/shaders/orthographic.frag new file mode 100644 index 0000000..84b6b2e --- /dev/null +++ b/frontend/_rigidbody/shaders/orthographic.frag @@ -0,0 +1,5 @@ +varying lowp vec4 VertexColor; + +void main() { + gl_FragColor = VertexColor; +} \ No newline at end of file diff --git a/frontend/_rigidbody/shaders/orthographic.vert b/frontend/_rigidbody/shaders/orthographic.vert new file mode 100644 index 0000000..0356f9c --- /dev/null +++ b/frontend/_rigidbody/shaders/orthographic.vert @@ -0,0 +1,13 @@ +attribute vec2 position; +attribute vec4 color; + +uniform mat4 projection; +uniform mat4 model; + +varying lowp vec4 VertexColor; + +void main() { + vec4 fragmentPosition = projection * model * vec4(position, 1, 1); + gl_Position = fragmentPosition; + VertexColor = color; +} \ No newline at end of file -- cgit v1.2.1