diff options
| author | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-09 01:45:40 +0100 |
|---|---|---|
| committer | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-09 01:45:40 +0100 |
| commit | 6fd78657f010bcc48c746a7b1e6ae9a0589adf5b (patch) | |
| tree | 479512c0858e3ddfbcd891a193dfc96530771087 /Unicity.Renderer/shaders | |
| parent | 3b214e75effaca1ba67daaf29d0a94e5b0129386 (diff) | |
| download | Unicity-6fd78657f010bcc48c746a7b1e6ae9a0589adf5b.tar.gz Unicity-6fd78657f010bcc48c746a7b1e6ae9a0589adf5b.tar.bz2 Unicity-6fd78657f010bcc48c746a7b1e6ae9a0589adf5b.zip | |
Can render triangles now
Diffstat (limited to 'Unicity.Renderer/shaders')
| -rw-r--r-- | Unicity.Renderer/shaders/test.frag | 11 | ||||
| -rw-r--r-- | Unicity.Renderer/shaders/test.vert | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/Unicity.Renderer/shaders/test.frag b/Unicity.Renderer/shaders/test.frag index 5f28270..58db0c6 100644 --- a/Unicity.Renderer/shaders/test.frag +++ b/Unicity.Renderer/shaders/test.frag @@ -1 +1,10 @@ -
\ No newline at end of file +#version 400 core + +out vec4 FragColor; + +in vec4 vertexColor; + +void main() +{ + FragColor = vertexColor; +}
\ No newline at end of file diff --git a/Unicity.Renderer/shaders/test.vert b/Unicity.Renderer/shaders/test.vert index c087c1a..c0395f0 100644 --- a/Unicity.Renderer/shaders/test.vert +++ b/Unicity.Renderer/shaders/test.vert @@ -2,7 +2,11 @@ layout (location = 0) in vec3 aPos; +out vec4 vertexColor; +uniform vec4 inColor; + void main() { - gl_Position = vec4(aPos, 1.0); + gl_Position = vec4(aPos, 1.0f); + vertexColor = inColor; }
\ No newline at end of file |
