update
This commit is contained in:
@@ -1,24 +1,9 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec2 begin;
|
||||
layout (location = 1) in int glyph;
|
||||
layout (location = 2) in float lineHeight;
|
||||
layout (location = 2) in float fontSize;
|
||||
layout (location = 3) in vec4 color;
|
||||
|
||||
/*
|
||||
typedef struct GlyphMeta GlyphMeta;
|
||||
struct GlyphMeta {
|
||||
// chunk 1
|
||||
RLVector2 uv0;
|
||||
RLVector2 uv1;
|
||||
|
||||
// chunk 2
|
||||
real32 xOffset;
|
||||
real32 yOffset;
|
||||
real32 width;
|
||||
real32 height;
|
||||
};
|
||||
*/
|
||||
|
||||
uniform samplerBuffer glyph_table;
|
||||
|
||||
uniform mat4 projection;
|
||||
@@ -57,8 +42,8 @@ void main() {
|
||||
vec2 offset = chunk2.xy;
|
||||
vec2 dims = chunk2.zw;
|
||||
|
||||
vec2 p0 = begin + offset*lineHeight;
|
||||
vec2 p1 = begin + (offset + dims)*lineHeight;
|
||||
vec2 p0 = begin + offset*fontSize;
|
||||
vec2 p1 = begin + (offset + dims)*fontSize;
|
||||
|
||||
vec2 dest_half_size = (p1 - p0) / 2;
|
||||
vec2 dest_center = (p1 + p0) / 2;
|
||||
|
||||
Reference in New Issue
Block a user