Repository navigation
Create a texture: Stride is too small. #170
Answered
by
TheMostDiligent
FlightBlaze
asked this question in
Q&A
|
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 |
Answered by
TheMostDiligent
Nov 25, 2021
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. |
1 reply
Answer selected by
TheMostDiligent
|
FYI, there are texture loading utilities: https://github.com/DiligentGraphics/DiligentTools/blob/master/TextureLoader/interface/TextureLoader.h |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.