5#ifndef __UTIL_PROJECTION_H__
6#define __UTIL_PROJECTION_H__
21 : x(tfm.x), y(tfm.y),
z(tfm.
z),
w(
make_float4(0.0f, 0.0f, 0.0f, 1.0f))
39 float w =
dot(t->w,
b);
48 a.x * t->y.x + a.y * t->y.y + a.z * t->y.z,
49 a.x * t->z.x + a.y * t->z.y + a.z * t->z.z);
182 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, f / (f - n), -f * n / (f - n), 0, 0, 1, 0);
184 float inv_angle = 1.0f /
tanf(0.5f * fov);
188 return scale * persp;
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
local_group_size(16, 16) .push_constant(Type b
additional_info("compositor_sum_squared_difference_float_shared") .push_constant(Type output_img float dot(value.rgb, luminance_coefficients)") .define("LOAD(value)"
ccl_device_inline float3 transform_perspective(ccl_private const ProjectionTransform *t, const float3 a)
ccl_device_inline ProjectionTransform projection_perspective(float fov, float n, float f)
ccl_device_inline ProjectionTransform operator*(const ProjectionTransform &a, const ProjectionTransform &b)
ccl_device_inline ProjectionTransform make_projection(float a, float b, float c, float d, float e, float f, float g, float h, float i, float j, float k, float l, float m, float n, float o, float p)
ccl_device_inline float3 transform_perspective_direction(ccl_private const ProjectionTransform *t, const float3 a)
struct PerspectiveMotionTransform PerspectiveMotionTransform
CCL_NAMESPACE_BEGIN struct ProjectionTransform ProjectionTransform
ccl_device_inline Transform projection_to_transform(const ProjectionTransform &a)
ccl_device_inline ProjectionTransform projection_identity()
ccl_device_inline ProjectionTransform projection_transpose(const ProjectionTransform &a)
ProjectionTransform projection_inverse(const ProjectionTransform &a)
ccl_device_inline ProjectionTransform projection_orthographic(float znear, float zfar)
ccl_device_inline void print_projection(const char *label, const ProjectionTransform &t)
#define ccl_device_inline
#define CCL_NAMESPACE_END
CCL_NAMESPACE_BEGIN ccl_device_inline float3 zero_float3()
ccl_device_inline void print_float4(ccl_private const char *label, const float4 a)