simvx.graphics.renderer.billboard2d_pass

Billboard2DPass: depth-tested camera-facing billboards (Sprite3D + Text3D).

The 2D-in-3D mechanism #2 of design §5.2 (P5b): a sibling of :class:ParticlePass that draws Sprite3D images and Text3D MSDF glyph runs as camera-facing quads INSIDE render_scene_content (the HDR 3D pass), depth-tested against the 3D geometry (depth_test=True, depth_write=False, alpha blend) so a billboard correctly occludes / is occluded by meshes.

GPU-driven like the particle / tilemap passes: every billboard instance is one row of an SSBO (anchor, plane offset, half-size, uv rect, colour, bindless texture slot, is_msdf flag); one vkCmdDraw of 6 * N shader-generated verts covers them all. The camera basis (camera_right / camera_up from inv(view)) and view_proj ride a push constant; the bindless texture array is bound at set 1 (the same array tilemap / mesh sample), and the fragment shader branches on is_msdf to decode Sprite3D textures linearly and Text3D glyphs via the median-MSDF path (pixel-identical to text.frag / ui2d.frag).

Module Contents

Classes

Billboard2DPass

Depth-tested billboard pass for Sprite3D images and Text3D glyph runs.

Data

API

simvx.graphics.renderer.billboard2d_pass.__all__

[‘BILLBOARD_DTYPE’, ‘FLAG_IS_MSDF’, ‘Billboard2DPass’, ‘build_sprite3d_row’, ‘build_text3d_rows’]

simvx.graphics.renderer.billboard2d_pass.log

‘getLogger(…)’

simvx.graphics.renderer.billboard2d_pass.MAX_BILLBOARDS

20000

class simvx.graphics.renderer.billboard2d_pass.Billboard2DPass(engine: Any)[source]

Depth-tested billboard pass for Sprite3D images and Text3D glyph runs.

Initialization

setup(render_pass: Any = None) None[source]
rebuild_pipeline(render_pass: Any) None[source]

Recreate the pipeline against a different render pass (e.g. HDR).

render(cmd: Any, billboards: numpy.ndarray, view_proj: numpy.ndarray, camera_right: numpy.ndarray, camera_up: numpy.ndarray, extent: tuple[int, int], px_range: float = 4.0) None[source]

Record the billboard draw (one draw covers every instance).

cleanup() None[source]