AmelieHeinrich / Oni

C++ D3D12 research renderer
75 stars 1 forks source link

Texturecache suggestion #1

Open FaultyPine opened 6 days ago

FaultyPine commented 6 days 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 6 days 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!