Closed roeas closed 1 year ago
Overall, it looks that you limit
Init
to create CPU data and addCreateGraphicsResources
interface to submit cpu data to gpu.
- [Optional]
Submit
maybe a better name to presentCreateGraphicsResources
?- [Optional] You can wrap all renderer or renderpass logics to a new data structure such as
engine::RenderPipeline
and EditorApp can simply hold m_editorRenderPipeline and m_engineRenderPipeline. The pipeline concept is a series of Renderer/RenderPass in order. Multiple RenderPipelines(Rasterize, RayTrace, Compute, ...) contribute to the final rendering world.- Currently, we have an user-visible entity named shader collection. It seems not very reasonable.
Indeed it is a bit strange to think of SVC as a component.
In project serialization, the main part is Entity/Component data but also allow to add other data such as SVC. It seems an asset, not a component in the unity document.
You can add a launch option which let editor pre-compile all shaders? Sometimes it will be helpful. For example, a user doesn't edit any shader, just make a game level which doesn't need to wait in a random timepoint.
Compiling and loading shaders like this, instead of compiling all shader variants at once:
Heres an example of the Renderer frame:
Click here if you want to check every variant of your uber shader compiling.