Texture consisting of 300'000 floats not supported?

I tried to generate a texture of size 300’000x1, then tried to set data of that size (meaning length = 300’000), but it threw an “wrong parameter” exception - why? Do I have to square it and round up to the next power of 2, e.g. 2^(floor(ln(sqrt(300’000))/ln(2))+1) and use this value for width and height of the texture, even if mipmapping is false? Why is that?

Best regards…


This page may help answer your question somewhat…

Resource Limits (Direct3D 11) - Win32 apps | Microsoft Docs

1 Like

Because maximum width and height is limited, generally to 16k x 16k (making up for aprox 256M pixels), also make sure you have correct Surface format.

1 Like