BredaUniversityGames / DXX-Raytracer

DXX Raytracer is a fork of the DXX Retro project for Windows. DXX Raytracer uses modern raytracing techniques to update the graphics of the beloved retro game known as Descent.
Other
216 stars 10 forks source link

Fix for issue with texture files with extensions specified in material defintion files not loading. #23

Closed Lehm2000 closed 3 months ago

Lehm2000 commented 3 months ago

This fixes a bug introduced with the addition of the dds texturing loading, where files defined in the material definition file that contained an extension would not load. Fix checks if the extension is already included in the texture path.

Lehm2000 commented 3 months ago

Note to self, what if the .dds exists but the material file has it written down as texture.png.

Will test this out and maybe make an addition for when that happens.

Overall, good way to fix this and support older material files. Will accept after I did a check on .dds files when the material asks for a .png.

I actually thought about that scenario. But I figured if someone is going through the trouble of authoring dds files they would update the material files as well. So I figured that issue should be fixed on the content side. If you feel different I can look at it again.

SamBoots commented 3 months ago

Good way to handle this if the .png doesn't exist look for the .dds file and vice versa I think, I'll implement that when I test out this cl.