Giter Club home page Giter Club logo

ecez_vulkan's Introduction

Hi there!

โšก I love zig, go, rust, Graphics, SIMD and data oriented programming!

๐ŸŽฎ Playing and making video games is my main hobby


ecez_vulkan's People

Contributors

avokadoen avatar

Watchers

 avatar

ecez_vulkan's Issues

Dynamic instance count

Currently the only memory used that requires growing is the DrawInstance buffer. If this buffer was growable instance count could be dynamic

StagingBuffer breaks when multiple transfers are scheduled

This code does not work:

    try staging_buffer.scheduleTransfer(vkd, device, vertex_buffer, Vertex, &vertices);
    try staging_buffer.scheduleTransfer(vkd, device, vertex_buffer, Vertex, &vertices);
    try staging_buffer.flushAndCopyToDestination(vkd, device);

API for rendered models

  • load custom shaders in build
  • bind arbitrary component to shader
  • (MVP) static allocation of instance data (dynamic should come later)
  • bind components to UBO & other instance data

remove inflight frames functionality

This feature seems to over complicate a lot of other features related to memory coherency between device and host and I am not convinced it helps with framerate for real applications

ECS integration: RenderContext is a generated type that take rendereable components

This is only an idea, not sure I will go this route

To integrate with ecez RenderContext should be a generated type like so:

// each component must have one mat4 and nothing else in them?
const RenderTags = [_]type{BoxMesh, CoolHelmet, Sword, Other}
const RenderContext = CreateRenderContext(RenderTags);
var renderer = RenderContext.init(allocator, window, &[_]RenderContext.MesInstancehInitializeContex{
       .{
            .cgltf_path = "models/BoxTextured/BoxTextured.gltf",
            .instance_count = 1,
        },
        .{
            .cgltf_path = "models/ScifiHelmet/SciFiHelmet.gltf",
            .instance_count = 2,
        },
       // ... (mismatched init count compared to types is an compile time error
    });
    
 renderer.updateState(BoxMesh, first_component, box_components); 

staging buffer api change

The transfer should take the full slice of data with a offset argument and count argument so that the schedule function can handle non atomic internally

Support multiple shaders for models

API:

      var context = try RenderContext.init(allocator, window, &[_]PipelineInitialize{
            .{
                .update_rate = .{ .time_seconds = 0.01 },
                .vertex_path = "some/path/shader.vert",
                .fragment_path = "some/path/shader.frag",
                .mesh_instances =  &[_]RenderContext.MesInstancehInitializeContex{
                    .{
                        .cgltf_path = "models/ScifiHelmet/SciFiHelmet.gltf",
                        .instance_count = 1,
                    },
                    .{
                        .cgltf_path = "models/BoxTextured/BoxTextured.gltf",
                        .instance_count = 2,
                    },
                }, 
            },
            .{
                .update_rate = .{ .time_seconds = 0.05 },
                .vertex_path = "some_different/path/shader.vert",
                .fragment_path = "some_different/path/shader.frag",
                .mesh_instances =  &[_]RenderContext.MesInstancehInitializeContex{
                    .{
                        .cgltf_path = "models/ScifiHelmet/SciFiHelmet.gltf",
                        .instance_count = 3,
                    },
                    .{
                        .cgltf_path = "models/BoxTextured/BoxTextured.gltf",
                        .instance_count = 4,
                    },
                }, 
            },
    });

Of course mesh and instance handles would need to be updated as well.

Imgui flicker (caused by multibuffering?)

Imgui currently flickers on high frame rate. I suspect this is "racy" behavior caused by having multiple frames in flight which the backend does not communicate with imgui.

Should investigate how the official backends handle this at some point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.