Add defines, basic shaders
This commit is contained in:
12
defines.h
Normal file
12
defines.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
struct Vertex {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
float a;
|
||||
};
|
||||
9
res/shaders/basic.fs
Normal file
9
res/shaders/basic.fs
Normal file
@@ -0,0 +1,9 @@
|
||||
#version 330 core
|
||||
|
||||
layout(location = 0) out vec4 f_color;
|
||||
|
||||
in vec4 v_color;
|
||||
|
||||
void main() {
|
||||
f_color = v_color;
|
||||
}
|
||||
11
res/shaders/basic.vs
Normal file
11
res/shaders/basic.vs
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 330 core
|
||||
|
||||
layout(location = 0) in vec3 a_position;
|
||||
layout(location = 1) in vec4 a_color;
|
||||
|
||||
out vec4 v_color;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(a_position, 1.0f);
|
||||
v_color = a_color;
|
||||
}
|
||||
Reference in New Issue
Block a user