mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 23:52:35 +00:00
Renamed lighting shader to default, shoehorned in glsl 3.30 support for Intel on Linux, removed duplicate handleGlError methods, added OpenGL and GLU to Object namespace, removed redundant includes for OpenGL and GLU, VBO and VAO now render (all be it incorrectly)
This commit is contained in:
10
shaders/fragment/default.glsl
Normal file
10
shaders/fragment/default.glsl
Normal file
@@ -0,0 +1,10 @@
|
||||
# version 330
|
||||
|
||||
in vec3 outColor;
|
||||
in vec4 outNormal;
|
||||
in vec3 outUV;
|
||||
in float outTextureID;
|
||||
|
||||
void main() {
|
||||
gl_FragColor = vec4(outColor, 1.0);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# version 150
|
||||
|
||||
out vec4 frag_colour;
|
||||
|
||||
void main() {
|
||||
frag_colour = vec4(0.5, 0.0, 0.5, 1.0);
|
||||
}
|
||||
24
shaders/vertex/default.glsl
Normal file
24
shaders/vertex/default.glsl
Normal file
@@ -0,0 +1,24 @@
|
||||
# version 330
|
||||
|
||||
layout(location = 0) in vec3 inPosition;
|
||||
layout(location = 1) in vec3 inColor;
|
||||
layout(location = 2) in vec4 inNormal;
|
||||
layout(location = 3) in vec3 inUV;
|
||||
layout(location = 4) in float inTextureID;
|
||||
|
||||
out vec3 outColor;
|
||||
out vec4 outNormal;
|
||||
out vec3 outUV;
|
||||
out float outTextureID;
|
||||
|
||||
uniform vec3 worldPosition;
|
||||
|
||||
void main() {
|
||||
// projection * view * model *
|
||||
outColor = inColor;
|
||||
outNormal= inNormal;
|
||||
outUV = inUV;
|
||||
outTextureID = inTextureID;
|
||||
|
||||
gl_Position = vec4(worldPosition + inPosition, 1.0);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# version 330
|
||||
|
||||
layout(location = 0) in vec3 vert;
|
||||
uniform vec3 position;
|
||||
|
||||
void main() {
|
||||
// projection * view * model *
|
||||
gl_Position = vec4(vert+position, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user