dotrix
dotrix copied to clipboard
Seperate shader
This attempts to seperate Shaders from Pipelines
It also removes the need to cleanup shaders from the renderer
Note: There is now 1 pipeline instance per Pipeline object, need to see what impact that has
Just a head's up of what sort of things I am working on
- Have generic trait for Buffer/Textures/Meshs this allows arbitary structures to represent a buffer
- Instead of this:
let proj_view = globals.get::<ProjView>().unwrap(); // Later Binding::Uniform("label", Stage::All, &proj_view.buffer),- It becomes
SInce ProjView will have the trait saying it provides a Bufferlet proj_view = globals.get::<ProjView>().unwrap(); // Later Binding::Uniform("label", Stage::All, &proj_view), - Allow binding Asset or Id<Asset> this is done by binding to a trait sort of like
Into<Buffer>but needing a ref to Assets too - Handle reloadable Assets, have assets track what they depend on and decide if they need to rebind/update if when of their dependencies need a rebind
- Move most boilerplate code for a render/compute into the actual draw call reducing code in user land
I have most of this already implemented in a seperate branch but I will be merging it in stages