• Advertisement
Sign in to follow this  

multisampling makes geometrics invisible

This topic is 3005 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement