Original Post
Hello everyone,
I was wondering how would one go about taking a non-power of two texture and using a compute shader, re-scale it either up or down to the nearest power of two.
I know how to get the nearest power of two, and I know how to initialize DirectX 11 and create the required shaders; however I have never used the compute features of DX11.
I'm not sure what happens when I create my texture (using D3DX11CreateTextureFromFile) with a non-power of 2 texture ? I think it ends up padding the texture which undesirable.
Or should I just create a structured buffer, store all the pixels in there and make an unordered access view of that ? But then I need to figure out how to assign the threads as I cannot split a few pixels in half.
The application has to typically process GB worth of textures, hence why I'm going for Direct Compute.
Any ideas ?
I was wondering how would one go about taking a non-power of two texture and using a compute shader, re-scale it either up or down to the nearest power of two.
I know how to get the nearest power of two, and I know how to initialize DirectX 11 and create the required shaders; however I have never used the compute features of DX11.
I'm not sure what happens when I create my texture (using D3DX11CreateTextureFromFile) with a non-power of 2 texture ? I think it ends up padding the texture which undesirable.
Or should I just create a structured buffer, store all the pixels in there and make an unordered access view of that ? But then I need to figure out how to assign the threads as I cannot split a few pixels in half.
The application has to typically process GB worth of textures, hence why I'm going for Direct Compute.
Any ideas ?