mirror of
https://github.com/xdsopl/robot36.git
synced 2025-12-06 07:12:07 +01:00
fixed rainbow
This commit is contained in:
parent
0026a26897
commit
72bc00fc62
|
|
@ -27,9 +27,9 @@ limitations under the License.
|
|||
static inline uchar4 rainbow(float v)
|
||||
{
|
||||
#if 1
|
||||
float r = 4.0f * v - 2.0f;
|
||||
float g = 2.0f - 4.0f * fabs(v - 0.5f);
|
||||
float b = 2.0f - 4.0f * v;
|
||||
float r = clamp(4.0f * v - 2.0f, 0.0f, 1.0f);
|
||||
float g = clamp(2.0f - 4.0f * fabs(v - 0.5f), 0.0f, 1.0f);
|
||||
float b = clamp(2.0f - 4.0f * v, 0.0f, 1.0f);
|
||||
#else
|
||||
float r = v;
|
||||
float g = v;
|
||||
|
|
|
|||
Loading…
Reference in a new issue