Implement displaying of extra cursor color

This commit is contained in:
Kovid Goyal
2025-08-26 21:27:13 +05:30
parent 6c44eadf77
commit e76f4c630f
4 changed files with 54 additions and 16 deletions

View File

@@ -2,6 +2,8 @@
#define zero_or_one(x) step(1.f, x)
// condition must be zero or one. When 1 thenval is returned otherwise elseval
#define if_one_then(condition, thenval, elseval) mix(elseval, thenval, condition)
// a < b ? thenval : elseval
#define if_less_than(a, b, thenval, elseval) mix(thenval, elseval, step(b, a))
vec4 vec4_premul(vec3 rgb, float a) {
return vec4(rgb * a, a);