tfg.rendering.framebuffer.Framebuffer
Stay organized with collections
Save and categorize content based on your preferences.
A framebuffer holding rasterized values required for deferred shading.
tfg.rendering.framebuffer.Framebuffer(
barycentrics: tfg.rendering.framebuffer.RasterizedAttribute
,
triangle_id: tf.Tensor,
vertex_ids: tf.Tensor,
foreground_mask: tf.Tensor,
attributes: Dict[str, tfg.rendering.framebuffer.RasterizedAttribute
] = dataclasses.field(default_factory=dict)
)
Tensors are expected to have shape [batch, height, width, channels].
For now, the fields are specialized for triangle rendering. Other primitives
may be supported in the future.
Immutable once created. Uses cached_property to avoid creating redundant
tf ops when properties are accessed multiple times.
Attributes |
background_mask
|
|
batch_size
|
|
height
|
|
is_multi_layer
|
|
num_layers
|
|
pixel_count
|
|
width
|
|
barycentrics
|
Dataclass field
|
triangle_id
|
Dataclass field
|
vertex_ids
|
Dataclass field
|
foreground_mask
|
Dataclass field
|
attributes
|
Dataclass field
|
Methods
layer
View source
layer(
index
)
Slices at the given layer index, returning a single-layer Framebuffer.
__eq__
__eq__(
other
)
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-07-01 UTC.
[null,null,["Last updated 2022-07-01 UTC."],[],[],null,["# tfg.rendering.framebuffer.Framebuffer\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/graphics/blob/master/tensorflow_graphics/rendering/framebuffer.py#L88-L185) |\n\nA framebuffer holding rasterized values required for deferred shading. \n\n tfg.rendering.framebuffer.Framebuffer(\n barycentrics: ../../../tfg/rendering/framebuffer/RasterizedAttribute,\n triangle_id: tf.Tensor,\n vertex_ids: tf.Tensor,\n foreground_mask: tf.Tensor,\n attributes: Dict[str, ../../../tfg/rendering/framebuffer/RasterizedAttribute] = dataclasses.field(default_factory=dict)\n )\n\nTensors are expected to have shape \\[batch, height, width, channels\\].\n\nFor now, the fields are specialized for triangle rendering. Other primitives\nmay be supported in the future.\n\nImmutable once created. Uses cached_property to avoid creating redundant\ntf ops when properties are accessed multiple times.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-------------------|-----------------|\n| `background_mask` | \u003cbr /\u003e \u003cbr /\u003e |\n| `batch_size` | \u003cbr /\u003e \u003cbr /\u003e |\n| `height` | \u003cbr /\u003e \u003cbr /\u003e |\n| `is_multi_layer` | \u003cbr /\u003e \u003cbr /\u003e |\n| `num_layers` | \u003cbr /\u003e \u003cbr /\u003e |\n| `pixel_count` | \u003cbr /\u003e \u003cbr /\u003e |\n| `width` | \u003cbr /\u003e \u003cbr /\u003e |\n| `barycentrics` | Dataclass field |\n| `triangle_id` | Dataclass field |\n| `vertex_ids` | Dataclass field |\n| `foreground_mask` | Dataclass field |\n| `attributes` | Dataclass field |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `layer`\n\n[View source](https://github.com/tensorflow/graphics/blob/master/tensorflow_graphics/rendering/framebuffer.py#L172-L185) \n\n layer(\n index\n )\n\nSlices at the given layer index, returning a single-layer Framebuffer.\n\n### `__eq__`\n\n __eq__(\n other\n )"]]