Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/shaders/font.glsl
2020-08-11 12:07:21 -04:00

5 lines
389 B
GLSL
Executable file

uint getLower(const uint val) { return val & uint(0xFFFF); }
uint getUpper(const uint val) { return val >> 16 & uint(0xFFFF); }
float fixed_to_float(const uint val) { return float(val)/32.0; }
vec2 fixed2_to_vec2(const uint val) { return vec2(fixed_to_float(getLower(val)), fixed_to_float(getUpper(val))); }
vec2 uint_to_vec2(const uint val) { return vec2(getLower(val), getUpper(val)); }