*
* *
*
scene.org
Log in:
login for 1 year
No account? register here

Scene.org is hosted and supported by:
Scene.org is sponsored by:
* forum - #coders

*
Topic:  Mipmaps for a render target in DirectX 9
* Posted by absence Friday 16 January 2004 - 19:39 
Hello

Does anyone know if it's possible to generate mipmaps for a texture used as render target? Specifying anything but one miplevel when creating the render target texture results in an "invalid call" error here. I've searched around on MSDN and the web without much luck, but can't quite imagine something like this isn't possible. Anyone know about this and care to enlighten me?

Thanks,
Torgeir

* Posted by flash^peon Monday 26 January 2004 - 10:45 
Hello,

as far as I understand, this feature doesn't work on all graphics hardware. For it to be working the following caps must be present:

D3DCAPS2_CANAUTOGENMIPMAP

There is some official text on dynamic mipmap generation on:

http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/directx9_c/directx/graphics/programmingguide/gettingsta rted/direct3dtextures/automaticgenerationofmipmaps.asp

It's said to be working with all texture (render target) formats except for the packed DXTC ones. I haven't had much luck with testing this on my hardware, but maybe you will.

I guess some games use this feature for dynamic shadow generation (to create the impression of soft shadows).

Flash / Peon

[Post edited by flash^peon on Monday 26 January 2004 - 10:47]


* Posted by Jare Thursday 15 April 2004 - 1:33 
Mac / 3pixels used a weird technique to generate mipmaps on a rendertarget, for his smooth blurring effect. He created a rendertarget with mipmap levels, then he'd set each mipmap level surface as rendertarget while texturing from the same texture, using mipmaplodbias to select the appropriate level.

I think this was deemed "not legal" and is not supported anymore on new hardware. Ideally, the autogenmipmaps thing should do something like this unless the hardware is even smarter, but I don't know which cards/drivers support it - my 9800 with not-so-recent catalysts does.

[Post edited by Jare on Thursday 15 April 2004 - 1:34]


*