Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
RenderTypePlugin.hpp File Reference
#include "../core/Types.hpp"
#include "../core/Hash.hpp"
#include "./RenderOrigin.hpp"
#include "./frame/RenderStage.hpp"
#include "./frame/Frustum.hpp"
#include "./frame/OcclusionView.hpp"
#include "./lod/LodSelection.hpp"
#include "./lod/LodViewState.hpp"
#include "./frame/ViewShading.hpp"
#include "./frame/FrameConstants.hpp"
#include "./draw/RenderItem.hpp"
#include "./draw/DrawCommand.hpp"
#include <unordered_set>
#include "./draw/DrawList.hpp"
#include "./draw/ClipState.hpp"
#include "./rhi/TransientBufferPool.hpp"
#include "../ecs/Registry.hpp"
#include "../ecs/components/Transform.hpp"
#include "../resource/ResourceManager.hpp"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_access.hpp>
#include <glm/gtc/quaternion.hpp>
#include <cmath>
#include <algorithm>
#include <array>
#include <unordered_map>
#include <vector>
Include dependency graph for RenderTypePlugin.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  esengine::RenderFrameContext
struct  esengine::CameraView
 What every plugin needs to know about the camera, derived once per collect from the inverse view-projection — the single source for parallax, world-rect culling and the depth draws are sorted by (each previously re-derived, or in the depth's case assumed, inside the plugins). More...
struct  esengine::ParallaxAnchor
 Where parallax is measured from, when it is not the camera drawing the frame. More...
struct  esengine::MeshDocumentRecord
 What a renderable's program key is made of, with no say in where the facts came from — a live entity's components, or a PREPARED cell's document. One combination, so the two can be shown to agree. More...
struct  esengine::MeshProgramFacts
struct  esengine::RenderPrewarmResult
 What readying a set of renderables' programs found. Counts, not JSON: this crosses no boundary and pays for no encoding. More...
struct  esengine::RenderCollectContext
struct  esengine::RenderCollectContext::LodView
 Which view is looking, where its level choices are kept, and where the selections it makes are counted. More...
class  esengine::RenderTypePlugin

Namespaces

namespace  esengine

Enumerations

enum class  esengine::RenderPurpose : u8 { esengine::Scene , esengine::ShadowDepth , esengine::ScreenOverlay , esengine::Motion }
 What a collect is FOR — the phase, not a feature the geometry has. More...
enum class  esengine::CasterSplit : u8 { esengine::All , esengine::Held , esengine::Movers }

Functions

ParallaxAnchor & esengine::parallaxAnchor ()
CameraView esengine::computeCameraView (const glm::mat4 &viewProjection)
glm::vec3 esengine::towardViewer (const glm::vec3 &worldPos, const CameraView &camera)
 Decomposes transform and returns its world position shifted toward the camera by (1 - parallax); factor 1 = no shift, 0 = screen-pinned. Applied before the frustum cull so a parallaxed renderable is culled where drawn.
glm::vec3 esengine::ribbonSide (const glm::vec3 &tangent, const glm::vec3 &worldPos, const CameraView &camera, const glm::vec3 &lastSide)
 The side vector a ribbon widens along: perpendicular to both its path and the viewer, so the strip faces the eye instead of lying in one plane.
glm::vec3 esengine::parallaxedWorldPosition (ecs::Transform &transform, const glm::vec2 &parallax, const CameraView &camera)
glm::vec2 esengine::flatTurnZ (const glm::quat &rotation)
 The cos/sin of the turn a plane renderable draws with: its entity's rotation about Z, which is the only part a flat quad uses.
void esengine::orientedWorldAabb (const glm::vec3 &position, const glm::quat &rotation, const glm::vec3 &scale, const glm::vec3 &localMin, const glm::vec3 &localMax, glm::vec3 &outCentre, glm::vec3 &outHalf)
 The world AABB of a turned box: its centre and half-extents, from a local box and the position, rotation and scale that place it.
glm::vec3 esengine::flatHalfExtents (const glm::vec2 &turn, const glm::vec3 &half)
 World AABB half-extents of a flat box turned by turn (from flatTurnZ). |R| * half, exact for a box. An unturned entity gets half back, so the result is never narrower than the box itself.