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/engine/shaders/font.glsl

6 lines
389 B
Text
Raw Normal View History

2021-05-09 20:04:41 -04:00
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)); }