We’ve got textures, everybody!

Published by leon on

Now we’re all caught up, I reached a bit of a milestone yesterday. I managed to get textures loading and I’m fairly happy with the solution for now. This one is a milestone for me because I really wasn’t sure how to organise my resources, so the “final” design was a bit of trial and a lot of error. Right now, if you request to load the same texture twice, it’ll oblige no questions asked, but the design allows for future optimisations in this area.

You may notice that I no longer have the floor model drawing, this isn’t for spooky dramatic effect… it’s because right now I only have a single global descriptor set so the floor was also receiving the skull texture and it looked silly.

I still have to figure out how to approach binding a descriptor set per model, if that is even the best / correct way to do things, so I have a bit more research to do.

From here, loading multiple maps (normal, spec etc) is trivial, and only requires tweaks to the shader so I’ll save that for when I’m drowning in failures and need an easy win.

Next up will be shadows, although I’m still making my way through the Vulkan Cookbook so that target may be a way off yet.


1 Comment

Yo dawg, I heard you liked refactoring… - leonwoud.com · August 30, 2022 at 12:57 pm

[…] I mentioned in my last post, I did get textures working – but there was a large caveat. I only had a single shared […]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *