AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.41k stars 288 forks source link

Extract Rendering Setup From Camera #388

Closed ilexp closed 7 years ago

ilexp commented 8 years ago

Summary

Right now, every Camera instance has its own configuration of rendering passes. The only viable way to share them among different Cameras is using a Prefab, which may have side effects that are not intended or wanted by the user. Sharing rendering setups is the default case, so it should be easy and straight-forward.

Workaround

ilexp commented 8 years ago

Issue A: Temporary / Programmatic Passes

Solution A1

Solution A2

Issue B: Per-Camera Pass Events

Solution B1

ilexp commented 8 years ago

Note: Consider renaming RenderPass to RenderStep, since pass is a term that is usually used in the context of rendering an object in multiple stages.

ilexp commented 7 years ago

Note: Consider going one step further and make the rendering setup itself (by default, it's "foreach Camera") configurable.

ilexp commented 7 years ago

Note: Consider re-introducing Camera viewports, so each Camera can define the (relative) region to render to. In addition, each rendering step should allow to specify a viewport rect relative to the Camera viewport.

ilexp commented 7 years ago

Note: Consider allowing a Camera to specify a base rendertarget that will be used whenever the rendering step would render to screen.

ilexp commented 7 years ago

Note: Consider how the editor / Camera Views would interact with the new setup. Does it make sense to allow users to specify a Rendering and / or Camera Setup to use for every Camera View?

ilexp commented 7 years ago

Note: Consider allowing to configure a rendering step as to whether the RenderTarget to bind should be auto-resized to the TargetResolution before rendering. This could be the default setting, while it would still be possible to assert that the Resource-specified size should be used.

ilexp commented 7 years ago

Progress

ilexp commented 7 years ago

Progress

Immediate ToDo

ilexp commented 7 years ago

Progress

Immediate ToDo

ilexp commented 7 years ago

Progress

Immediate ToDo

ilexp commented 7 years ago

Progress

Immediate ToDo

ilexp commented 7 years ago

Progress

Immediate ToDo

ilexp commented 7 years ago

Progress

Immediate ToDo

ilexp commented 7 years ago

Progress

Immediate ToDo

ilexp commented 7 years ago

Progress

Done. Closing this.