Hey guys,
Im currently looking for a good implementation for changing the multisampling rate at runtime. I would be fine if i can switch between the modes listed in here: http://www.nvidia.com/object/coverage-sampled-aa.html. (got a GTX680)
I thought about creating multiple render targets, with different mutlisampling mode/quality and depending on the desired AA mode set on of these as render target and finally copy its content to the backbuffer. I already started with this approach but atm im very unsure if thats a good solution respectively if its even possible to work.
I wanted to use
CreateRenderTarget(...)
and then either use either
UpdateSurface(...) StretchRect(...) GetRenderTargetData(...)
to copy the contents from the Rendertarget in the backbuffer.
Now after I spend some time with this approach, first I thougt that its not really good to copy the content from the rendertarget to the backbuffer at each frame. And secondly, more important: all this functions have listed under the remarks that the surface must not have a multisampling type or it wont work. (which would definately "kill" this approach for me)
Another idea of mine was, just resetting/recreating the device every time the user wants to change the AA mode and fill in the new device parameter with the new multisampling type. But I guess, this is a very bad solution.
Now is it possible to do something like with my first apprach with different render targets to get this working? Or if not, how would one in general do something like this? I unfortunately havent found any code samples on this. Im using HLSL by the way, probably i can also control the Mulisampling rate within my shader. Performance in general is no issue for me, its just a little techdemo.
Regards