Skip to main content
gamedev.net
🔒 Locked

MultiSample Problem

Started by of_ownage 0 replies 450+ views
Original Post
of_ownage
of_ownage
hi guys, i have a problem with multisampling. My m_Direct3DObject->CreateDevice returns a IDirect3DDevice9* with MultiSampleType = 4 samples and MultiSampleQuality = 2. Now im creating a texture like this. g_Device->CreateTexture( 1024, 768, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A32B32G32R32F, D3DPOOL_DEFAULT, &TexScene, 0)); TexScene->GetSurfaceLevel(0, &FullScreenBuffer); So heres the problem. My DepthStencilSurface has MultiSampleType = 4, Quality = 2 this new Texture has MultiSampleType = 0, Quality = 0. If i now do SetRenderTarget(FullScreenBuffer); i get the error::: MultiSampleType between DepthStencil Buffer and RenderTarget must match whats now the best idea? Disable MultiSampling? Or can i somehow use the multisampling with the created TexScene? Thank you
ET3D
ET3D
Use CreateDepthStencilSurface to create a depth surface that matches your render target. Then use SetDepthStencilSurface to set it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.