Create a texture: Stride is too small. #170
-
Hi! When I call
If I comment the assertions in TextureVkImpl.cpp, everything will work just fine. About the image:
About the texture:
How stride is calculated: stride = width * channels What stride size is expected by Diligent: width * 4 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yes, you are creating a four-channel RGBA texture, so Diligent expects 4-channel input data. There are no 3-channel textures in graphics APIs. |
Beta Was this translation helpful? Give feedback.
-
FYI, there are texture loading utilities: https://github.com/DiligentGraphics/DiligentTools/blob/master/TextureLoader/interface/TextureLoader.h |
Beta Was this translation helpful? Give feedback.
Yes, you are creating a four-channel RGBA texture, so Diligent expects 4-channel input data. There are no 3-channel textures in graphics APIs.