shader prog
This commit is contained in:
@@ -11,22 +11,17 @@ shaderdefinition_t SHADER_UNLIT_DEFINITION = {
|
||||
.vert =
|
||||
"#version 330 core\n"
|
||||
"layout(location = 0) in vec3 aPos;\n"
|
||||
"layout(location = 1) in vec2 aTexCoord;\n"
|
||||
"uniform mat4 u_Proj;\n"
|
||||
"uniform mat4 u_View;\n"
|
||||
"uniform mat4 u_Model;\n"
|
||||
"out vec2 v_TexCoord;\n"
|
||||
"void main() {\n"
|
||||
" gl_Position = u_Proj * u_View * u_Model * vec4(aPos, 1.0);\n"
|
||||
" v_TexCoord = aTexCoord;\n"
|
||||
"}\n",
|
||||
|
||||
.frag =
|
||||
"#version 330 core\n"
|
||||
"in vec2 v_TexCoord;\n"
|
||||
"out vec4 FragColor;\n"
|
||||
"uniform sampler2D u_Texture;\n"
|
||||
"void main() {\n"
|
||||
" FragColor = texture(u_Texture, v_TexCoord);\n"
|
||||
" FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
|
||||
"}\n"
|
||||
};
|
||||
Reference in New Issue
Block a user