39#ifndef DVD_RENDER_BIN_H_
40#define DVD_RENDER_BIN_H_
47class RenderingComponent;
48struct RenderStagePass;
86 "OPAQUE",
"WATER",
"TERRAIN",
"TERRAIN_AUX",
"SKY",
"TRANSLUCENT",
"IMPOSTOR",
"UNKNOWN"
94class SceneRenderState;
95class RenderPassManager;
115 using SortedQueue = eastl::fixed_vector<RenderingComponent*, Config::MAX_VISIBLE_NODES, false>;
125 void clear() noexcept;
This class contains a list of "RenderBinItem"'s and stores them sorted depending on designation.
eastl::fixed_vector< RenderingComponent *, Config::MAX_VISIBLE_NODES, false > SortedQueue
void postRender(const SceneRenderState &renderState, RenderStagePass stagePass, GFX::CommandBuffer &bufferInOut)
void addNodeToBin(const SceneGraphNode *sgn, RenderStagePass renderStagePass, F32 minDistToCameraSq)
std::atomic_ushort _renderBinIndex
void populateRenderQueue(RenderStagePass stagePass, RenderQueuePackages &queueInOut) const
U16 getSortedNodes(SortedQueue &nodes) const
std::array< SortedQueue, to_base(RenderBinType::COUNT)> SortedQueues
void sort(RenderBinType type, RenderingOrder renderOrder)
bool empty() const noexcept
eastl::array< RenderBinItem, Config::MAX_VISIBLE_NODES > RenderBinStack
RenderBinStack _renderBinStack
const RenderBinItem & getItem(const U16 index) const
U16 getBinSize() const noexcept
static const char * renderBinType[]
Handle console commands that start with a forward slash.
eastl::fixed_vector< RenderQueuePackage, Config::MAX_VISIBLE_NODES, false > RenderQueuePackages
@ WATER
Water might end up being as expensive as terrain, so these will probably need reshuffling.
@ IMPOSTOR
Impostors should be overlayed over everything since they are a debugging tool.
@ TERRAIN_AUX
E.g. infinite ground plane.
@ TRANSLUCENT
Translucent items use a [0.0...1.0] alpha value supplied via an opacity map or via the albedo's alpha...
@ SKY
Sky needs to be drawn after ALL opaque geometry to save on fillrate.
@ TERRAIN
Actual terrain. It should cover most of the remaining empty screen space.
@ OPAQUE
Opaque objects will occlude a lot of the terrain and terrain is REALLY expensive to render,...
@ FRONT_TO_BACK_ALPHA_LAST
constexpr auto to_base(const Type value) -> Type
RenderingComponent * _renderable
RenderPackage * _rPackage
RenderingComponent * _rComp