forked from bartvdbraak/blender
Cycles: Cleanup, move utility function to utility file
Was an old TODO, this function is handy for some math utilities as well.
This commit is contained in:
parent
aa0602130b
commit
b797a5ff78
@ -96,12 +96,6 @@ void triangle_intersect_precalc(float3 dir,
|
|||||||
isect_precalc->kz = kz;
|
isect_precalc->kz = kz;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO(sergey): Make it general utility function. */
|
|
||||||
ccl_device_inline float xor_signmask(float x, int y)
|
|
||||||
{
|
|
||||||
return __int_as_float(__float_as_int(x) ^ y);
|
|
||||||
}
|
|
||||||
|
|
||||||
ccl_device_inline bool triangle_intersect(KernelGlobals *kg,
|
ccl_device_inline bool triangle_intersect(KernelGlobals *kg,
|
||||||
const IsectPrecalc *isect_precalc,
|
const IsectPrecalc *isect_precalc,
|
||||||
Intersection *isect,
|
Intersection *isect,
|
||||||
|
@ -1451,6 +1451,11 @@ ccl_device_inline float beta(float x, float y)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ccl_device_inline float xor_signmask(float x, int y)
|
||||||
|
{
|
||||||
|
return __int_as_float(__float_as_int(x) ^ y);
|
||||||
|
}
|
||||||
|
|
||||||
/* projections */
|
/* projections */
|
||||||
ccl_device_inline float2 map_to_tube(const float3 co)
|
ccl_device_inline float2 map_to_tube(const float3 co)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user