File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -204,14 +204,14 @@ namespace Gltf {
204
204
Pbr::RGBAColor defaultRGBA) {
205
205
// Find or load the image referenced by the texture.
206
206
const ImageKey imageKey = std::make_tuple (texture.Image , sRGB );
207
- winrt::com_ptr<ID3D11ShaderResourceView> textureView = imageMap[imageKey];
207
+ winrt::com_ptr<ID3D11ShaderResourceView> textureView =
208
+ texture.Image != nullptr ? imageMap[imageKey] : pbrResources.CreateSolidColorTexture (defaultRGBA);
208
209
if (!textureView) // If not cached, load the image and store it in the texture cache.
209
210
{
210
211
// TODO: Generate mipmaps if sampler's minification filter (minFilter) uses mipmapping.
211
212
// TODO: If texture is not power-of-two and (sampler has wrapping=repeat/mirrored_repeat OR minFilter uses
212
213
// mipmapping), resize to power-of-two.
213
- textureView = texture.Image != nullptr ? LoadImage (pbrResources.GetDevice ().get (), *texture.Image , sRGB )
214
- : pbrResources.CreateSolidColorTexture (defaultRGBA);
214
+ textureView = LoadImage (pbrResources.GetDevice ().get (), *texture.Image , sRGB );
215
215
imageMap[imageKey] = textureView;
216
216
}
217
217
You can’t perform that action at this time.
0 commit comments