Table of Contents

Class CameraRenderer

Namespace
RustPlusApi.Camera
Assembly
RustPlusApi.Camera.dll

Renders the Rust+ camera ray stream into images. Create one per subscribed camera (sized from CameraInfo), feed each CameraFrame via AddRays(CameraFrame), then call Render() for the current image.

public sealed class CameraRenderer
Inheritance
CameraRenderer
Inherited Members

Remarks

The ray decode, sample shuffle and colouring are ported from liamcottle/rustplus.js. They have not yet been validated against a real captured frame; treat image fidelity as experimental until a golden-payload capture validates it.

Constructors

CameraRenderer(int, int)

Renders the Rust+ camera ray stream into images. Create one per subscribed camera (sized from CameraInfo), feed each CameraFrame via AddRays(CameraFrame), then call Render() for the current image.

public CameraRenderer(int width, int height)

Parameters

width int

Camera image width in pixels, from Width.

height int

Camera image height in pixels, from Height.

Remarks

The ray decode, sample shuffle and colouring are ported from liamcottle/rustplus.js. They have not yet been validated against a real captured frame; treat image fidelity as experimental until a golden-payload capture validates it.

Methods

AddRays(CameraFrame)

Decodes a frame's ray data and accumulates its samples into the image buffer.

public void AddRays(CameraFrame frame)

Parameters

frame CameraFrame

The camera frame whose ray data will be decoded.

Render()

Renders the accumulated samples to a PNG image.

public byte[] Render()

Returns

byte[]