DirectX speeding up CreateTexture2d
Hello,
porting a game from android/ios to winRT and win phone 8.
works perfect on winRT.
however on win phone 8 on the nokia 920 we see a lot of slow down dealing with CreateTexture2D. mainly since we have to convert a lot of palleted textures to full RGBA images. could anyone recommend the best format to use to get the most performance? we already have 80% of our textures in DXT3 and DXT1 format (BC1 and BC2 in directx) however we simply have some images which are 16 color palleted images which we for one reason or another can not convert to dxt3 or dxt1
Thank you very much.
Re: DirectX speeding up CreateTexture2d
You may consider delivering the same images in a pre-processed format too. Full RGBA is certainly a bloated format for a 16-color image, but it is pretty probable that even a simple deflate will shrink it a lot.
Re: DirectX speeding up CreateTexture2d
i really wish we could pre-bloat them to full RGBA images. as i said though we can't change the format of the image. it seems though that CreateTexture2d takes a really long time. on the order of 34 milliseconds to create 26 textures. compared to opengl on the same adreno 225 chipset. this is very much hurting our product. guess i'll have to find someway to pre-load them....ugh.
Re: DirectX speeding up CreateTexture2d
How about reducing the number of textures then? I admit I do not do much realtime graphics, but whenever I read about performance optimization techniques, the list usually contains this. The aim is usually not to speed up initialization, but to reduce the number of texture switches in rendering state. But it also affects initialization.
Re: DirectX speeding up CreateTexture2d
Are you using the exact same textures as in WinRT? Given that the screen size of the phone is much smaller (despite having high-resolution) I would strongly suggest to reduce the size of the textures. Have you tried that?
Also have you tried DirectX Toolkit? It Supports WP8:
[url]http://directxtk.codeplex.com/[/url]
One of the features is a lightweight DDS texture loader.
Features:
SpriteBatch - simple & efficient 2D sprite rendering
SpriteFont - bitmap based text rendering
Effects - set of built-in shaders for common rendering tasks
PrimitiveBatch - simple and efficient way to draw user primitives
GeometricPrimitive - draws basic shapes such as cubes and spheres
Model - draws simple meshes loaded from CMO or SDKMESH files
CommonStates - factory providing commonly used D3D state objects
VertexTypes - structures for commonly used vertex data formats
[B] DDSTextureLoader - light-weight DDS file texture loader
WICTextureLoader - WIC-based image file texture loader[/B]
ScreenGrab - light-weight screen shot saver
I dont know if the WICTextureLoader works on the phone. As far as I know Windows Phone does not support WIC. But the DDSTextureLoader may be something to look at.
Re: DirectX speeding up CreateTexture2d
DDSTextureLoader converts to DXT1/3/5 which we are already doing. we've done numerous speed ups in other sections of the code and have gotten acceptable performance. so for now we are ok.
Re: DirectX speeding up CreateTexture2d
[QUOTE=hdxpete;909969]DDSTextureLoader converts to DXT1/3/5 which we are already doing. we've done numerous speed ups in other sections of the code and have gotten acceptable performance. so for now we are ok.[/QUOTE]
Thats great to know. Please do let us know when your project is published. Would love to take a look :)