multisampling makes geometrics invisible

Started by
3 comments, last by Alucard999666 14 years, 4 months ago
I've been trying to create some kind of antialias effect on triangles so I changed my presentparams to m_kPresentParams.MultiSampleType = D3DMULTISAMPLE_4_SAMPLES; m_kPresentParams.MultiSampleQuality = nMultiSampleQuality-1; Before that I checked the displayadapter with pkDirect3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,D3DFMT_X8R8G8B8,true,D3DMULTISAMPLE_4_SAMPLES,&nMultiSampleQuality) It works well on a test project but since i tried it on the main programm it doesnt show any triangles at all anymore. I'm using dx9 the latest graphics driver and sdk. Anyone had to deal with something like that before?
Advertisement
Are any of the functions failing? Do the debug runtimes report any errors?
Ok now i m getting a few Errors.
I guess this is what i was looking for?

Direct3D9: (ERROR) :MultiSampleType between DepthStencil Buffer and RenderTarget must match.

I didnt know that they could be different.
So if I use D3DFMT_D24S8 for depthStencil my rendertarget has to have the same format?

btw even without any more changes but the debug version its already drawing again
Quote:Original post by Alucard999666
Ok now i m getting a few Errors.
I guess this is what i was looking for?

Direct3D9: (ERROR) :MultiSampleType between DepthStencil Buffer and RenderTarget must match.

I didnt know that they could be different.
So if I use D3DFMT_D24S8 for depthStencil my rendertarget has to have the same format?
The multisample type must be the same, yes. Are you creating a separate multisampled render target? If so you'll need to use CreateDepthStencilSurface() to create a multisampled depth stencil surface.

Quote:Original post by Alucard999666
btw even without any more changes but the debug version its already drawing again
I'd assume that's just coincidence for some quirky reason (The debug runtimes should be more likely to fail (Which is a good thing!)) - the bug is still there and needs fixed.
Ya I guess I found the buggy area I'm creating a texture and from what i see the drawing into the texture is failing.

Thanks again Steve! I ll try my luck.

This topic is closed to new replies.

Advertisement