fuckingtech/public/assets/glsl/lygia/draw/flip.hlsl
Elias Rhouzlane bf76c6b086 fix: code
2025-04-06 17:23:52 +02:00

15 lines
487 B
HLSL

/*
contributors: Patricio Gonzalez Vivo
description: Flips the float passed in, 0 becomes 1 and 1 becomes 0
use: flip(<float> v, <float> pct)
license:
- Copyright (c) 2021 Patricio Gonzalez Vivo under Prosperity License - https://prosperitylicense.com/versions/3.0.0
- Copyright (c) 2021 Patricio Gonzalez Vivo under Patron License - https://lygia.xyz/license
*/
#ifndef FNC_FLIP
#define FNC_FLIP
float flip(in float v, in float pct) {
return lerp(v, 1. - v, pct);
}
#endif