Mark things that can be done in parallel

This commit is contained in:
2024-08-14 19:52:13 -04:00
parent 491731283c
commit 35057890a9

View File

@@ -1,29 +1,37 @@
# This document is for the high level functionality of the engine
# Notes
Anything marked with (P) means that it should be capable of being recorded (command buffer recording) or processed in parallel
# Frame Begin
## Phase 1 (Simulation)
- Simulation tick
- Determine if the frame should be rendered. If not, We skip to the next 'frame'
- If the frame should render. We go to phase 2 (1.5 actually)
## Phase 1.5 (Transfer)
- Any data needing to be transferred to the device (GPU) will be done so within reason. If the buffer is full then we simply transfer what we could fit and move on.
## Phase 2 (Cameras)
- Cameras will have a flag to determine if they are active or not. Active cameras are populated into a global list and then processed
- Once this list is gathered, Each camera's frustum will be updated (from the simulation tick)
- Game objects are culled in each Camera, The camera will contain a list of objects in it's view until the next frame.
- Once this list is gathered, Each camera's frustum will be updated (from the simulation tick) (P)
- Game objects are culled in each Camera, The camera will contain a list of objects in it's view until the next frame. (P)
## Phase 3 (Lights)
- Once the cameras know what objects are in their views they will begin with a pre-depth pass. This also reduces the amount of overdraw
- Each light in the scene that is not culled (Based on distance from the camera and other flags) will have their shadow (depth) pass be performed
- Once the cameras know what objects are in their views they will begin with a pre-depth pass. This also reduces the amount of overdraw (P)
- Each light in the scene that is not culled (Based on distance from the camera and other flags) will have their shadow (depth) pass be performed (P)
## Phase 4 (Off-Screen Rendering)
- Each camera is rendered, Both textureless and textured objects are rendered in their respective pipelines.
- Each camera is rendered, Both textureless and textured objects are rendered in their respective pipelines. (P)
## Phase 5 (Composition)
- GBuffer composition
- GBuffer composition (P)
- Cameras within the view of other cameras are composited (How the ***FUCK*** do I do this? *No idea*)