sokol sprite render

This commit is contained in:
2023-05-04 22:07:00 +00:00
parent 1408c05103
commit ae0f41539b
25 changed files with 338 additions and 352 deletions

View File

@@ -2,18 +2,11 @@
layout (location = 0) in vec4 vertex;
out vec2 coords;
layout (std140) uniform Projection
{
mat4 projection;
};
layout (std140) uniform Resolution
{
vec2 resolution;
};
uniform mat4 proj;
uniform vec2 res;
void main()
{
gl_Position = projection * vec4(vertex.xy, 0.0, 1.0);
coords = vertex.zw;;
gl_Position = proj * vec4(vertex.xy, 0.0, 1.0);
coords = vertex.zw;
}

View File

@@ -1,7 +1,6 @@
#version 330 core
in vec2 texcoords;
out vec4 color;
uniform sampler2D image;
uniform vec3 spriteColor;

View File

@@ -2,15 +2,10 @@
layout (location = 0) in vec4 vertex;
out vec2 texcoords;
layout (std140) uniform Projection
{
mat4 projection;
};
uniform mat4 model;
uniform mat4 mpv;
void main()
{
texcoords = vertex.zw;
gl_Position = projection * model * vec4(vertex.xy, 0.0, 1.0);
}
gl_Position = mpv * vec4(vertex.xy, 0.0, 1.0);
}

View File

@@ -2,10 +2,7 @@
layout (location = 0) in vec4 vertex; // <vec2 pos, vec2 tex>
out vec2 TexCoords;
layout (std140) uniform Projection
{
mat4 projection;
};
uniform mat4 projection;
void main()
{