-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce Render Pipeline Bureaucracy #326
Labels
Breaking Change
Breaks binary or source compatibility
Core
Area: Duality runtime or launcher
Performance
Related to runtime or editor performance
Rendering
Related to rendering / graphics
Task
ToDo that's neither a Bug, nor a Feature
Milestone
Comments
ilexp
added
Task
ToDo that's neither a Bug, nor a Feature
Core
Area: Duality runtime or launcher
Performance
Related to runtime or editor performance
labels
May 8, 2016
Issue:
Potential Solution:
Potential Solution:
Potential Solution:
|
Progress
Immediate ToDo
|
Progress
Immediate ToDo
|
Progress
Immediate ToDo
|
Progress
Immediate ToDo
|
Progress
Immediate ToDo
|
Progress
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Breaking Change
Breaks binary or source compatibility
Core
Area: Duality runtime or launcher
Performance
Related to runtime or editor performance
Rendering
Related to rendering / graphics
Task
ToDo that's neither a Bug, nor a Feature
Summary
Investigate where the render pipeline could be improved with regard to reducing virtual method calls, class (vs. struct) usage and overall OOP chit-chat.
Analysis
ICmpRenderer
has its ownIsVisible
call. 95% of them just check for the visibility groups and / or the screen overlay flag being set, followed by checking if they're in bound-radius range of the viewport.ICmpRenderer.GetCullingData
out-returns a struct with all information required to decide whether it will be visible to a device or not. Can be invoked to directly write into some internal RawList array store, which can then be batch-processed easily.GetCullingData
only needs to be called once per frame per object and its results can be re-used by every camera and rendering pass.ICmpRenderer.Draw
does the rendering like it does right now.CalcZOffset
could be used as a fallback.ICmpRenderer
should still act "per-object" and expose one draw method per object.ICmpMultiRenderer
interface where one draw method is called with an array of all queried objects of the matching type is provided.With the multi-renderer interface in mind, it might make sense to also refactor theIRendererVisibilityStrategy
interface, so the query method actually provides guaranteed type-sorted renderer arrays / RawLists in some form.Keep the overhead low. Potentially even keep the "exposed RawList" approach, but enforce specifying "type sections" inside that list.If this shows a notable improvement (yet to be shown), we could also go a similar route for updates and provide a matchingICmpMultiUpdatable
interface.The text was updated successfully, but these errors were encountered: