Table of Contents

Class RenderTextureCamera

Namespace
Stride.CommunityToolkit.Rendering.Compositing
Assembly
Stride.CommunityToolkit.dll

A camera that draws into a texture instead of the window: the texture, the camera, and the compositor pieces that join them, as AddRenderTextureCamera(Game, Entity, int, int, PixelFormat, Action<PostProcessingEffects>?) built them. Dispose it to take the camera out of the compositor again and release the texture.

public sealed class RenderTextureCamera : IDisposable
Inheritance
RenderTextureCamera
Implements

Remarks

The texture is whatever a texture is good for: the emissive map of a monitor's material, the fill of a shape, a sprite. It holds the previous frame's picture, because the feed draws after the main view - one frame of lag nobody can see, and the price of the main view being able to show it.

Properties

Camera

The camera component, for its projection, clip planes and field of view.

public CameraComponent Camera { get; }

Property Value

CameraComponent

Entity

The entity carrying the camera: move it, parent it, aim it like any other.

public Entity Entity { get; }

Property Value

Entity

Forward

The forward renderer behind the feed, sharing the compositor's stages with the main view. Its PostEffects is where a feed gets its own look.

public ForwardRenderer Forward { get; }

Property Value

ForwardRenderer

Renderer

The renderer in the compositor's top-level collection that draws this feed.

public SceneCameraRenderer Renderer { get; }

Property Value

SceneCameraRenderer

Slot

The compositor slot the camera is bound to, one of its own.

public SceneCameraSlot Slot { get; }

Property Value

SceneCameraSlot

Texture

The texture the camera draws into, a render target and a shader resource in one.

public Texture Texture { get; }

Property Value

Texture

Methods

Dispose()

Takes the feed out of the compositor and releases the texture. The camera entity is left where it is.

public void Dispose()