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

Planned codebase refactors #4

Open
blueskythlikesclouds opened this issue Oct 6, 2022 · 0 comments
Open

Planned codebase refactors #4

blueskythlikesclouds opened this issue Oct 6, 2022 · 0 comments

Comments

@blueskythlikesclouds
Copy link
Owner

blueskythlikesclouds commented Oct 6, 2022

Going to write this stuff down so I don't forget.

  • Utilities.h needs to be split into multiple files. I kept slapping random functions there over the years and it turned into a mess. Possibly separated into files like Path.h, Math.h, BRDF.h, etc.
  • Contribute all the HedgeLib style source files back to the project and remove them from HedgeGI.
  • Sort the file I/O functions to be more like HedgeLib. Some of them are parsed manually, some of them are loaded directly. Bad and inconsistent.
  • NEVER use PropertyBag directly for data manipulation. Use property bags only during load/save time. Should store and manipulate relevant parameters from the scene classes directly.
  • Replace OpenGL with D3D11 or D3D12. Wouldn't it be funny if I used DLSS/FSR for the path traced image in the viewport?
  • Game type is not stored in the scene, making handling Unleashed/Generations/Lost World shading at the same time impossible. This is going to be worse with Frontiers as it uses different PRM channels.
  • Combine bake & scene parameters into a single class and pass that to the baking factory. Should make accessing certain data easier. This means getting rid of RaytracingContext.
  • Could separate sample counts for light field & GI.
  • Archive I/O classes that handle compression need to be grouped together.
  • Material system needs to be redone completely. Path trace function is incredibly long right now and doesn't need to be. Certain shading features could be toggled by checking flags directly stored in the material instead of relying on templates like targetEngine. This will also make handling shading differences between games easier.
  • All types stored in the scene class should be replaced with inline declarations instead of using unique_ptr.
  • Classes like Mesh, Material, etc. should store indices to relevant objects instead of referring to them with pointers.
  • Vertex class should be scrapped and deinterleaved data should be utilized instead. Even better if all the data is stored globally in the Scene class in a single collection and meshes index into them.
  • Been considering grouping files into folders in the filesystem instead of VS but I'm not sure yet.
  • Embed shaders and other data into the executable through other means instead of using Windows' god-awful resource API.
  • Could yeet some dependencies, I don't think I need parallel hashmap anymore.
  • A lot of utilities like PostRender are static classes right now, is that actually OK?
  • Document class is inefficient as hell right now with all the recursive lookups, could auto-generate a shared linear array enough to store all kinds of components and gather them from there instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant