Added a way to load shader from file, we use a .shader file which contains both our vertex and fragment shaders, we parse them out the file

This commit is contained in:
MichaelFisher1997
2025-01-06 20:01:22 +00:00
parent dcfd6031d7
commit d8895a1930
3 changed files with 69 additions and 20 deletions

14
res/shaders/Basic.shader Normal file
View File

@@ -0,0 +1,14 @@
#shader vertex
#version 330 core
layout(location = 0) in vec4 position;
void main() {
gl_Position = position;
};
#shader fragment
#version 330 core
layout(location = 0) out vec4 color;
void main() {
color = vec4(0.2, 0.3, 0.8, 1.0);
};