vkmEngine 1.0.15
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::PlanarReflector Struct Reference

A flat mirror: a rectangle on the entity's XZ plane, facing its +Y, that reflects the scene as it is - what is behind the camera, off the screen or facing away included. More...

#include <planar_reflector.h>

Public Attributes

glm::vec2 halfExtents = glm::vec2(2.0f)
 Along the entity's X and Z, metres; not scaled. 0 on either reflects nothing.
float renderScale = 0.5f
 Its picture's size, a share of the frame's.

Static Public Attributes

static constexpr float MIN_RENDER_SCALE = 0.1f
 The smallest picture, a share of the frame's.
static constexpr float MAX_RENDER_SCALE = 1.0f
 The largest: the frame's own size.

Detailed Description

A flat mirror: a rectangle on the entity's XZ plane, facing its +Y, that reflects the scene as it is - what is behind the camera, off the screen or facing away included.

Glossy surfaces lying on the rectangle - a mirror's glass, a pond, a polished floor - reflect it in place of the screen-space trace and the probes. Each one seen costs a second drawing of the scene from the mirrored camera, so few are seen at once: the backend draws the ones covering the most of the screen and leaves the rest to the trace and the probes.


The documentation for this struct was generated from the following file: