Skip to content
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

OvRendering Rework: Better Rendering capabilities, less redundancy, and code clean-up #277

Merged
merged 42 commits into from
Mar 19, 2024

Conversation

adriengivry
Copy link
Owner

@adriengivry adriengivry commented Nov 26, 2023

Description

Initiative to rework OvRendering to improve its modularity and prepare the field for upcoming work (such as shadow casting).

This work includes:

  • Partially moving Material from OvCore to OvRendering (The serialization part of material remains in OvCore for now)
  • Moved driver-specific features from Renderer to Driver
  • Improved StateMask for materials (take up less memory)
  • Renderer functionalities split into "extensions" called "render features"
  • Added a render pass system (custom drawing-logic executed in a per-determined order)
  • Implemented renderer for scene rendering: SceneRenderer (ECS-specific)
  • Simplified renderer usage to avoid redundant code between OvGame, OvEditor and OvCore.
  • Added support for multiple FBOs
  • Adding entities alongside the Light entity, such as Camera (moved from LowRenderer, and Drawable, which represent an entity that can be visually drawn).
  • Added PipelineState, which is an 8 bytes struct that contains information about the graphics context state. Rendering functions pass instances of PipelineState to each other by copy, allowing for hierarchical pipeline state updates, i.e. each scope can modify the pipeline state without affecting the level above. Lowest level functions (driver-level) are responsible for requesting the graphics backend to update its internal state. The driver also ensure that no unnecessary state change is performed (this is done by keeping track of the current state of the context, and comparing state change requests with the current state).
  • On-going initiative to hide the graphics backend implementation to the rest of the engine. The HAL namespace with a GraphicsAPI class has been added. This doesn't cover resources such a buffers, textures, and shaders, which individually hold graphics API-specific code (this code should be moved to the HAL in the future).
  • Added support for orbit and focus camera actions in Asset View
  • Overall rendering code cleanup

Related Issues

Screenshots

Renderer updated architecture
Overload-Better-Renderer

@adriengivry adriengivry added Feature New feature to the engine Refactoring Something that needs a refactoring Graphics Graphical feature Cleanup Code cleanup labels Nov 26, 2023
@adriengivry adriengivry force-pushed the rework/better-renderer branch 3 times, most recently from e256313 to 201f282 Compare November 28, 2023 00:05
* moved material to OvRendering
* re-organizing renderer code
* moved driver-related code to driver
* started working on implementing proper render features
* lighting and engine UBO render features added
* working on entity base class for OvRendering
* dealing with camera issues
* added OvSandbox applicaton to test rendering changes
The way Our UBO binding was broken, resulting in nothing showing up on screen when using multiple UBOs!!!
* descriptor system added to the CompositeRenderer
* asset view now support orbital rotations
* asset view now create a scene where it stores its actors including lights, so we can re-use the SceneRenderer
* WIP DebugSceneRenderer
* views can now show some basic debug display (lights, grid, camera)
Trying to break down the DebugSceneRenderer into render features
* OptRef added
* Describable base class added
* Updated actor picking
Still need some work, rendering is kind-of broken right now :)
@adriengivry adriengivry marked this pull request as ready for review December 7, 2023 18:47
Copy link
Collaborator

@litelawliet litelawliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a visual issue when selecting an object having children (with a mesh to render), all segments of all visible triangles are highlighted:
image

@adriengivry
Copy link
Owner Author

There is a visual issue when selecting an object having children (with a mesh to render), all segments of all visible triangles are highlighted: image

Fixed ✅

@adriengivry adriengivry merged commit d1c5592 into develop Mar 19, 2024
1 check passed
@adriengivry adriengivry deleted the rework/better-renderer branch March 19, 2024 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Code cleanup Feature New feature to the engine Graphics Graphical feature Refactoring Something that needs a refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improving Asset View controls
3 participants