DirectX 9 - Troubles with VOLUME texture rendering

Started by
10 comments, last by Nesta 14 years, 1 month ago
Steve's idea of creating the texture in default memory is good. I think you don't have to keep it there, either. You can create it, if creation fails scale it and create again, until you succeed. Then delete it and recreate as managed. As long as you don't create any default pool resources after that, I think things should work.

Another idea you can try is using a dynamic texture. There's a chance that'd be streamed directly from system RAM, instead of fully loaded onto the card, and therefore work (although more slowly than an on-card texture). That could allow you to use a larger texture than would fit on the card. It'd still be in the default pool, and therefore suffer from not being managed by Direct3D.

Last idea is to split that texture. Since I don't know how you use it, I can't tell if that's practical, but if you're only using a subset of the "frames" each frame and your shader will be able to access all you need even if they're not all in one texture, then splitting into several textures with different frames (with overlap, if necessary to get it to work right) will mean that you'll have smaller textures than Direct3D's texture management could work with, loading the ones you need.

BTW, as mentioned in another thread on the subject, reading "Resource Management Best Practices" in the DX docs is a good idea. Won't help greatly with your situation, but if you haven't read it, it's good material.
Advertisement
Thank you guys for your replies.

I will try to create texture using D3DPOOL_DEFAULT and will see what happens. The workaround I've implemented for now is to make a screenshot of the rendering panel and to analyze it's background. I know that background must be black but when rendering fails it turns white or other color. If I see that scene background is not black I perform scaling and recreate it. I know it might seem the ugliest solution ever but at least in this case user will still be able to see the volume instead of blank white scene.

This topic is closed to new replies.

Advertisement