LYGIA Shader Library

greaterThan (lygia/math/greaterThan)

greaterThan, returns 1 if x > y, 0 otherwise

Use:

greaterThan(<float|float2|float3|float4> x, y)

Check it on Github


#ifndef FNC_GREATERTHAN
#define FNC_GREATERTHAN
float greaterThan(float x, float y) { return step(y, x); }
float2 greaterThan(float2 x, float2 y) { return step(y, x); }
float3 greaterThan(float3 x, float3 y) { return step(y, x); }
float4 greaterThan(float4 x, float4 y) { return step(y, x); }
#endif

Dependencies:

Use:

greaterThan(<float|float2|float3|float4> x, y)

Check it on Github


#ifndef FNC_GREATERTHAN
#define FNC_GREATERTHAN
inline __host__ __device__ float greaterThan(float x, float y) { return step(y, x); }
inline __host__ __device__ float2 greaterThan(const float2& x, const float2& y) { return step(y, x); }
inline __host__ __device__ float3 greaterThan(const float3& x, const float3& y) { return step(y, x); }
inline __host__ __device__ float4 greaterThan(const float4& x, const float4& y) { return step(y, x); } 
#endif

License

LYGIA is dual-licensed under the Prosperity License and the Patron License for sponsors and contributors.

Sponsors and contributors are automatically added to the Patron License and they can ignore the any non-commercial rule of the Prosperity Licensed software (please take a look to the exception).

It's also possible to get a permanent comercial license hook to a single and specific version of LYGIA.

Get the latest news and releases

Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository