Added default shader
This commit is contained in:
parent
5d32976869
commit
dd4071c29e
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,4 +3,4 @@ bin/
|
||||
int/
|
||||
dep/
|
||||
*aps
|
||||
*res
|
||||
*.res
|
9
NothinFancy/res/defaultShader/fragment.shader
Normal file
9
NothinFancy/res/defaultShader/fragment.shader
Normal file
@ -0,0 +1,9 @@
|
||||
#version 330 core
|
||||
|
||||
out vec4 color;
|
||||
|
||||
in vec2 texCoord;
|
||||
|
||||
void main() {
|
||||
color = vec4(1.0, 0.0, 1.0, 1.0);
|
||||
}
|
16
NothinFancy/res/defaultShader/vertex.shader
Normal file
16
NothinFancy/res/defaultShader/vertex.shader
Normal file
@ -0,0 +1,16 @@
|
||||
#version 330 core
|
||||
|
||||
layout(location = 0) in vec3 pos;
|
||||
layout(location = 1) in vec2 texCoords;
|
||||
|
||||
uniform mat4 model;
|
||||
uniform mat4 view;
|
||||
uniform mat4 proj;
|
||||
|
||||
out vec2 texCoord;
|
||||
|
||||
void main() {
|
||||
//gl_Position = proj * view * model * vec4(pos, 1.0);
|
||||
gl_Position = model * vec4(pos, 1.0);
|
||||
texCoord = texCoords;
|
||||
}
|
Reference in New Issue
Block a user