class_docstr: Base class for CPU/GPU rasterization backend tests.
class_docstr_tok: ["Base","class","for","CPU\/GPU","rasterization","backend","tests","."]
docstr: Renders simple triangle and asserts that it is fully visible.
docstr_tok: ["Renders","simple","triangle","and","asserts","that","it","is","fully","visible","."]
code: def test_rasterizer_all_vertices_visible(self):
      """Renders simple triangle and asserts that it is fully visible."""
      vertices = tf.convert_to_tensor(
          [[[0, 0, 0], [10, 10, 0], [0, 10, 0]]], dtype=tf.float32
      )
      triangles = tf.convert_to_tensor([[0, 1, 2]], dtype=tf.int32)
      view_projection_matrix = tf.expand_dims(tf.eye(4), axis=0)
      frame_buffer = rasterization_backend.rasterize(
          vertices,
          triangles,
          view_projection_matrix,
          (self.IMAGE_WIDTH, self.IMAGE_HEIGHT),
          self._enable_cull_face,
          self._num_layers,
          self._backend,
      )
      self.assertAllEqual(
          frame_buffer.triangle_id.shape[:-1],
          frame_buffer.vertex_ids.shape[:-1],
      )
      # Assert that triangle is visible.
      self.assertAllLess(frame_buffer.triangle_id, 2)
      self.assertAllGreaterEqual(frame_buffer.triangle_id, 0)
      # Assert that all three vertices are visible.
      self.assertAllLess(frame_buffer.triangle_id, 3)
      self.assertAllGreaterEqual(frame_buffer.triangle_id, 0)
  
file_path: graphics/tensorflow_graphics/rendering/tests/rasterization_backend_test_base.py
imports: from absl.testing import parameterized
  import tensorflow
  from tensorflow_graphics.rendering import rasterization_backend
  from tensorflow_graphics.rendering.tests import rasterization_test_utils
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 6 for calling the RasterizationBackendTestBase obj's underlying member method code with example usage: obj.test_rasterizer_all_vertices_visible() without return types