Jazz2::Tiles::LayerEffectsTarget struct

What the special tile layers need from the viewport they are drawn in.

Owned by the viewport that renders the level (one per player in splitscreen) and handed to the tile map through ITileMapOwner::GetLayerEffectsTarget() while the scene is visited. The viewport fills in the textures, the tile map reports back what it drew.

Public variables

nCine::Viewport* View
Scene viewport, split at every layer that samples what is behind it (see nCine::Viewport::RequestSplit()).
std::uint32_t CopyPasses
Split passes that make BehindCopy, 0 if there are none.
std::uint32_t BlurPasses
Split passes that make BehindBlur, 0 if there are none.
nCine::Texture* XRayMask
Coverage of the actors behind the x-ray layers in the current frame, or nullptr if it wasn't rendered.
nCine::Texture* BehindBlur
Blurred scene behind the blur-behind layers, or nullptr if there is none (blur effects are off).
nCine::Texture* BehindCopy
Sharp copy of the scene behind the blur-behind layers, which they reflect and displace, or nullptr if none of them does.
std::uint16_t XRayDepth
Depth of the frontmost x-ray layer drawn, 0 if none.

Variable documentation

std::uint16_t Jazz2::Tiles::LayerEffectsTarget::XRayDepth

Depth of the frontmost x-ray layer drawn, 0 if none.

Written by the tile map while the scene is visited, and read back by the mask pass of the next frame, which runs before the scene: the mask is only rendered while an x-ray layer is on screen, and only the actors behind that layer go into it.