Create a gist now

Instantly share code, notes, and snippets.

Embed
RectWithSize device_rect = prim.local_clip_rect;
device_rect.p0 -= prim.task.content_origin;
device_rect.p0 *= uDevicePixelRatio;
device_rect.size *= uDevicePixelRatio;
vec2 local_pos = prim.task.common_data.task_rect.p0 +
clamp_rect(
glyph_pos * res.scale + uDevicePixelRatio * (glyph.offset - prim.task.content_origin),
device_rect);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment