You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like you found an oversight in the backend code (using textures with an row-pitch that isn't a multiple of 4 on GL). I modified the texcube-sapp.c sample to use a 5x5 SG_PIXELFORMAT_R8 texture, and that looks correct in the Metal backend, but messed up in the GL backend (on macOS).
I general, odd row pitches should be allowed as input, no matter what the alignment requirements are for the backend 3D API (because those alignment requirements wildly differ, with WebGPU currently being the worst offender) - only for textures without mipmaps of though.
I'll try to look into the issue when I'm back in Berlin and have access to my Windows machine again (need to check behaviour on D3D11 first).
Until then the only workaround I can think of without modifying sokol_gfx.h is to use SG_PIXELFORMAT_R8 textures with a width that's a multiple of 4.
I haven't found a way to specify pixel storage modes, so I can't use grayscale textures, which are not 4bytes aligned. Is there a way to do this?
The text was updated successfully, but these errors were encountered: