tfg.rendering.light.point_light.estimate_radiance

Estimates the spectral radiance of a point light reflected from the surface point towards the observation point.

In the following, A1 to An are optional batch dimensions, which must be broadcast compatible. B1 to Bm are optional batch dimensions for the lights, which must be broadcast compatible.

In case the light or the observation point are located behind the surface the function will return 0.

The gradient of this function is not smooth when the dot product of the normal with the light-to-surface or surface-to-observation vectors is 0.

point_light_radiance A tensor of shape '[B1, ..., Bm, K]', where the last axis represents the radiance of the point light at a specific wave length.
point_light_position A tensor of shape [B1, ..., Bm, 3], where the last axis represents the position of the point light.
surface_point_position A tensor of shape [A1, ..., An, 3], where the last axis represents the position of the surface point.
surface_point_normal A tensor of shape [A1, ..., An, 3], where the last axis represents the normalized surface normal at the given surface point.
observation_point A tensor of shape [A1, ..., An, 3], where the last axis represents the observation point.
brdf The BRDF of the surface as a function of: incoming_light_direction - The incoming light direction as the last axis of a tensor with shape [A1, ..., An, 3]. outgoing_light_direction - The outgoing light direction as the last axis of a tensor with shape [A1, ..., An, 3]. surface_point_normal - The surface normal as the last axis of a tensor with shape [A1, ..., An, 3]. Note - The BRDF should return a tensor of size '[A1, ..., An, K]' where the last axis represents the amount of reflected light in each wave length.
name A name for this op. Defaults to "estimate_radiance".
reflected_light_fall_off A boolean specifying whether or not to include the fall off of the light reflected from the surface towards the observation point in the calculation. Defaults to False.

A tensor of shape [A1, ..., An, B1, ..., Bm, K], where the last axis represents the amount of light received at the observation point after being reflected from the given surface point.

ValueError if the shape of point_light_position, surface_point_position, surface_point_normal, or observation_point is not supported.
InvalidArgumentError if 'surface_point_normal' is not normalized.