The renderer is a mess right now, while it is properly divided (techniques, GellyD3D), there are a few atrocities and things that don't need to be there. Now that the depth testing and particle drifting have been fixed and apprehended, now is the perfect time to implement a major refactor.
[x] The shaders currently redefine the inputs and outputs of each stage and also have incorrect naming (NormalSmoothing and NormalEstimation are differently named)
[x] The shaders are full of debug code and unused functions.
[x] The D3D9 shaders and D3D11 shaders are currently in completely different locations and would benefit from being in one module (that way stuff like the breakpoint math can be shared despite being in different shader models)
[x] Shader specialization should be supported but not implemented. (quality levels, feature toggles, we need the infra for this soon)
[x] The TextureOverride system is messy and reeks of bad code. It needs to be refactored while keeping the same concept for now (maybe some research can be done to sidestep the system?)
[x] Tooling for shaders (linting, formatting) is nonexistent and leads to a lot of formatting errors.
[x] No IDE for shader development has been described, nor a dev guide has been written. (I'm using VSCode and a specific extension)
[x] #11
[x] Constant buffers aren't filled out the same in the technique files.
[x] Constant buffers aren't used the same in each shader file.
[x] Particle radius is hardcoded (it shouldn't be)
[x] Stencil settings are filled out in the GellyRenderer file despite never being used (copy and paste artifact)
[x] D3D11.1 is required despite not using it.
[x] Viewport is setup each frame for some reason
[x] TechniqueRTs is unwieldy and currently passes much more than intended to the techniques. Perhaps a data flow refactor is needed for this one.
[x] DataTypes has a bad name and defines a 4-component vector because of some issue with the gelly engine colliding with the structs. Should be removed and be replaced with the struct from the engine since that is why it was made in the first place.
[x] add_shader is still defined in the renderer's CMake file for some reason. Probably forgot to remove it when it was changed to a modular architecture.
[x] Shader preprocessor should support a list instead of taking in a single shader name.
[x] Renderer still does a lot of manual work instead of offloading low-level code to GellyD3D where it'd make sense and would be isolated from the renderer.
[x] No API tracing or profiler has been confirmed to work with Gelly. apitrace works but doesn't capture Gelly. (this one is a nitpick)
[x] #12
[x] Shaders should be found and compiled into the binary automatically instead of being explicitly defined
Scope
Everything will probably be affected, so scope doesn't matter in this issue.
Acceptance Criteria
[x] All issues above are fixed
[x] Renderer does not change in terms of functionality
[x] Renderer isn't broken
[x] Renderer is still usable by the test application
Issues
The renderer is a mess right now, while it is properly divided (techniques, GellyD3D), there are a few atrocities and things that don't need to be there. Now that the depth testing and particle drifting have been fixed and apprehended, now is the perfect time to implement a major refactor.
RendererResources
is a fragment from a Microsoft tutorial and doesn't contribute much and needs to be removed. https://github.com/yogwoggf/gelly/blob/e0450ac5845825acd1fd6d5d66bdad7f835b2f83/modules/gelly-renderer/include/GellyRenderer.h#L34-L46TextureOverride
system is messy and reeks of bad code. It needs to be refactored while keeping the same concept for now (maybe some research can be done to sidestep the system?)TechniqueRTs
is unwieldy and currently passes much more than intended to the techniques. Perhaps a data flow refactor is needed for this one.DataTypes
has a bad name and defines a 4-component vector because of some issue with the gelly engine colliding with the structs. Should be removed and be replaced with the struct from the engine since that is why it was made in the first place.add_shader
is still defined in the renderer's CMake file for some reason. Probably forgot to remove it when it was changed to a modular architecture.apitrace
works but doesn't capture Gelly. (this one is a nitpick)Scope
Everything will probably be affected, so scope doesn't matter in this issue.
Acceptance Criteria