mirror of
https://github.com/MichaelFisher1997/opengl-cpp.git
synced 2025-10-18 12:17:45 +00:00
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:
14
res/shaders/Basic.shader
Normal file
14
res/shaders/Basic.shader
Normal 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);
|
||||
};
|
||||
Reference in New Issue
Block a user