tfg.rendering.interpolate.interpolate_vertex_attribute
Stay organized with collections
Save and categorize content based on your preferences.
Interpolate a single vertex attribute across the input framebuffer.
tfg.rendering.interpolate.interpolate_vertex_attribute(
attribute: tf.Tensor,
framebuffer: tfg.rendering.framebuffer.Framebuffer
,
background_value: Optional[Union[tf.Tensor, Iterable[float]]] = None
) -> tfg.rendering.framebuffer.RasterizedAttribute
Args |
attribute
|
2-D or 3-D vertex attribute Tensor with shape [batch,
num_vertices, num_channels] or [num_vertices, num_channels].
|
framebuffer
|
Framebuffer to interpolate across. Expected to contain
barycentrics, vertex_ids, and foreground_mask.
|
background_value
|
1-D Tensor (or convertible value) with shape
[num_channels] containing the value to use for background pixels. If None,
defaults to zero.
|
Returns |
A RasterizedAttribute containing the per-pixel interpolated values.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-10-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-10-28 UTC."],[],[]]