-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove unnessery realocations
- Loading branch information
Phoenixfirewingz
committed
Jun 21, 2023
1 parent
b02ee5d
commit 7c2730a
Showing
15 changed files
with
138 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
#version 330 core | ||
// input | ||
layout(location = 0) in vec2 position; | ||
layout(location = 1) in vec3 colour; | ||
layout(location = 1) in float colour; | ||
layout (location = 2) in vec2 uv; | ||
// output | ||
out vec3 vertex_colour; | ||
out vec2 texture_coord; | ||
|
||
//colour look up | ||
vec3 colours[] = vec3[](vec3(255,255,255),vec3(157, 6, 241),vec3(255, 127, 80),vec3(251, 0, 250),vec3(0, 192, 237),vec3(249, 185, 0),vec3(0, 238, 0)); | ||
|
||
void main() | ||
{ | ||
gl_Position = vec4(position, 0.0, 1.0); | ||
vertex_colour = colour; | ||
vertex_colour = normalize(colours[int(colour)]); | ||
texture_coord = uv; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.