View source on GitHub |
Computes differentiable barycentric coordinates from a Framebuffer.
tfg.rendering.barycentrics.differentiable_barycentrics(
framebuffer: tfg.rendering.framebuffer.Framebuffer
,
clip_space_vertices: type_alias.TensorLike,
triangles: type_alias.TensorLike,
use_vectorized_map: bool = True
) -> tfg.rendering.framebuffer.Framebuffer
The barycentric coordinates will be differentiable w.r.t. the input vertices. Later, we may support derivatives w.r.t. pixel position for mip-mapping.
Returns | |
---|---|
a copy of framebuffer , but the differentiable barycentric coordinates will
replace any barycentric coordinates already in the framebuffer .
|