Closed mgubisch closed 3 years ago
I've thought about this one a bit... The problem is that not having the textures leaves the model in a 'dangerous' state. It would throw an exception if you tried to render it.
Perhaps a better solution would be to use 'default' 1x1 textures for your models and then you can replace those at runtime? defaulttxt.zip
I'm loading my model from an SKDMesh file containing several meshes with different materials. Some of these Materials don't have textures because they are intended for HUD an should use a rendered texture on the fly
PBREffect factory throws an exception in this case causing the application to crash. I implemented a workaround disabling Texture support for the specific mesh if at least 1 Texture is missing just by checking all the Textureindices against -1 before effect creation.
Would be great to have this on master, and issue only a warning (or debug message) instead of an exception, perhaps with the possiblity to force the exception?