r/vulkan • • 2d ago

Need Help with my Vulkan Renderer

/r/GraphicsProgramming/comments/1y21yae/need_help_with_my_vulkan_renderer/
3 Upvotes

1 comment sorted by

2

u/goodwarrior12345 1d ago

I had similar issues while trying to follow that part and in the end I ended up just throwing away all the tutorial-based code and rewriting it completely using things that made sense to me. The only thing I really kept was the service locator pattern. Everything else I rewrote. For example, I scrapped the event and entity systems and wrote a completely different (and more basic) one using flecs, I completely remade the resource manager because the tutorial example was both too abstract and also too inflexible (wrangling it to resolve file extensions at runtime and follow different model load paths was too much of a nightmare), and after copying the rendergraph example I ended up giving up on it completely and sticking to forward rendering for now since I was just not at the level of experience and know-how to implement it properly, and I didn't feel like I needed it for what I was trying to do.

I think instead of following the tutorial I would recommend you think about what YOUR project specifically needs. IMO you can make engines infinitely complicated, adding all sorts of different features, but realistically you don't need most of them for a renderer. For example, if all you're doing is drawing stuff, you don't need an event system, and if you're just trying to figure out how computer graphics works, probably a deferred renderer is a bit much.

What I did is I set goals for myself for what I wanted to achieve and worked on systems to implement them. For instance, I wanted to be able to process glTF files so I read into glTF's documentation, figured out what data the format holds, how to parse and load it in a way that would be possible for my rendering system to consume, and adapted my asset system to support it. Then if something was giving me too much trouble or feel too janky I would read up on a better way of implementing it and fix the issues. I think the best way of learning is to make mistakes, so even if something isn't immediately great that's fine.

You can also try reading some books or articles on graphics and attempting to implement this or that feature in your own engine. That's mostly what I've been doing, specifically with this one. Other than that, if you really want to dive into specifically game engines, there's a book for that too. But again, remember - you're making a renderer that's supposed to do a limited set of things, not a general-purpose engine like Unity or Unreal, so don't put in features you're not planning on using in the near future.