-
Notifications
You must be signed in to change notification settings - Fork 30
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
Rethinking a engine structure #23
Comments
synchronization: CommandBuffer cmd;
...
cmd.addCompletionHandler([]() {
});
cmd.wait(); Can be done naively in Metal; By Timeline Semaphore + extra thread on Vulka/Dx12 |
Wanna rethink framebuffer/renderpass api. Goal:
Current syntax: fboGBuf = device.frameBuffer(lightingBuf,gbufDiffuse,gbufNormal,gbufDepth,zbuffer);
gbufPass = device.pass(FboMode(FboMode::PreserveOut,Color(0.0)),
FboMode(FboMode::PreserveOut),
FboMode(FboMode::PreserveOut),
FboMode(FboMode::PreserveOut,Color(1.0)),
FboMode(FboMode::PreserveOut,1.f)); 'Good' metal example desc.colorAttachments[0].texture = tex;
desc.colorAttachments[0].loadAction = MTLLoadActionClear;
desc.colorAttachments[0].clearColor = MTLClearColorMake(1, 1, 1, 1);
desc.colorAttachments[0].storeAction = MTLStoreActionStore; |
new syntax idea:
{
auto enc = cmdBuf.startEncoding(device);
enc.setFramebuffer({{color,Color(0,0,0,0),Tempest::Preserve}, {normal,Tempest::Discard,Tempest::Preserve}});
enc.setUniforms(op,ubo,&uboCpu,sizeof(uboCpu));
enc.draw(Resources::fsq());
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Things to do:
VectorImage
intoVectorImage
, as CPU data +VectorImage::Mesh
, as GPU data.Uniforms
to something else, probablyDescriptorSet
Things to think about:
VK_EXT_inline_uniform_block
The text was updated successfully, but these errors were encountered: