AmelieHeinrich / Oni

Modern toy DirectX 12 renderer
MIT License
155 stars 2 forks source link

Texturecache suggestion #1

Open FaultyPine opened 1 month ago

FaultyPine commented 1 month ago

Hey! I saw your Twitter posts and ended up glancing through your project, it looks great! One thing I saw is that your TextureCache is stored in each Model. I think a texture cache would serve its purpose better if it was shared among all models. That way if different models share a texture they could all use the same one from the cache. I.e. putting it in your renderer instead of in each model. Cheers!

AmelieHeinrich commented 1 month ago

Hey! Yes, definitely a good idea. The reason I put the TextureCache per model is because right now I never load more than one or two models at the same time, and they almost never have the same texture. That cache was specifically made to handle Bistro's fatass texture duplicates haha

It's definitely something I'll keep in mind. Thank you!