dotrix icon indicating copy to clipboard operation
dotrix copied to clipboard

Seperate shader

Open QuantumEntangledAndy opened this issue 3 years ago • 1 comments

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

QuantumEntangledAndy avatar May 04 '22 07:05 QuantumEntangledAndy

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
    let proj_view = globals.get::<ProjView>().unwrap();
    // Later
    Binding::Uniform("label", Stage::All, &proj_view),
    
    SInce ProjView will have the trait saying it provides a Buffer
  • 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

QuantumEntangledAndy avatar May 04 '22 14:05 QuantumEntangledAndy