diff options
author | omnisci3nce <17525998+omnisci3nce@users.noreply.github.com> | 2024-03-29 21:11:02 +1100 |
---|---|---|
committer | omnisci3nce <17525998+omnisci3nce@users.noreply.github.com> | 2024-03-29 21:11:02 +1100 |
commit | 765a6d0f36a9f16189efc449bde815a6c0938584 (patch) | |
tree | 68bf5121a6f8b4136205fed57893e696ea3a60d7 /assets | |
parent | ff907c6ffa7ed0a7c6ce938b40a6c223dd0a3b9d (diff) |
triangle
Diffstat (limited to 'assets')
-rw-r--r-- | assets/shaders/triangle.frag | 4 | ||||
-rw-r--r-- | assets/shaders/triangle.vert | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/assets/shaders/triangle.frag b/assets/shaders/triangle.frag index d26e5c4..dd6d148 100644 --- a/assets/shaders/triangle.frag +++ b/assets/shaders/triangle.frag @@ -1,8 +1,10 @@ #version 450 #extension GL_ARB_separate_shader_objects : enable +layout(location = 0) in vec3 in_position; + layout(location = 0) out vec4 out_colour; void main() { - out_colour = vec4(1.0); + out_colour = vec4(in_position.r + 0.5, in_position.g + 0.5, in_position.b + 0.5, 1.0); }
\ No newline at end of file diff --git a/assets/shaders/triangle.vert b/assets/shaders/triangle.vert index 0518c62..3dcf931 100644 --- a/assets/shaders/triangle.vert +++ b/assets/shaders/triangle.vert @@ -3,6 +3,9 @@ layout(location = 0) in vec3 in_position; +layout(location = 0) out vec3 out_position; + void main() { gl_Position = vec4(in_position, 1.0); + out_position = in_position; }
\ No newline at end of file |