LYGIA Shader Library

pow (lygia/math/pow)

pow for vectors

Dependencies:

Use:

<float2|float3|float4> pow(<float2|float3|float4> value, <float|float2|float3|float4> e)

Check it on Github



#ifndef FNC_POW
#define FNC_POW

inline __host__ __device__ float2 pow(const float2& v, float e) { return make_float2( pow(v.x, e), pow(v.y, e) ); }
inline __host__ __device__ float3 pow(const float3& v, float e) { return make_float3( pow(v.x, e), pow(v.y, e), pow(v.z, e) ); }
inline __host__ __device__ float4 pow(const float4& v, float e) { return make_float4( pow(v.x, e), pow(v.y, e), pow(v.z, e), pow(v.w, e) ); }

inline __host__ __device__ float2 pow(const float2& v, const float2& e) { return make_float2( pow(v.x, e.x), pow(v.y, e.y) ); }
inline __host__ __device__ float3 pow(const float3& v, const float3& e) { return make_float3( pow(v.x, e.x), pow(v.y, e.y), pow(v.z, e.z) ); }
inline __host__ __device__ float4 pow(const float4& v, const float4& e) { return make_float4( pow(v.x, e.x), pow(v.y, e.y), pow(v.z, e.z), pow(v.w, e.w) ); }

#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