sprites on screen yay
This commit is contained in:
BIN
build/res/gfx/test.png
Normal file
BIN
build/res/gfx/test.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
13
build/res/shader/texture_quad.fs
Normal file
13
build/res/shader/texture_quad.fs
Normal file
@ -0,0 +1,13 @@
|
||||
#version 330 core
|
||||
|
||||
uniform vec4 uColor;
|
||||
uniform sampler2D uTexture;
|
||||
|
||||
in vec2 iUV;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = uColor * texture(uTexture, iUV);
|
||||
}
|
15
build/res/shader/texture_quad.vs
Normal file
15
build/res/shader/texture_quad.vs
Normal file
@ -0,0 +1,15 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 lPosition;
|
||||
layout (location = 1) in vec2 lUV;
|
||||
|
||||
uniform mat4 uModel;
|
||||
uniform mat4 uProjection;
|
||||
uniform mat4 uView;
|
||||
|
||||
out vec2 iUV;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = uProjection * uView * uModel * vec4(lPosition, 1.0);
|
||||
iUV = lUV;
|
||||
}
|
Reference in New Issue
Block a user