Im back again with yet another problem :( My current problem is with my billboard effect. Im having trouble trying to get the depth correct so that billboards that are closer to the player are infront of the things that are actually behind them (like in the real world). Here is a screenshot of what the problem looks like:https://www.dropbox.com/s/rvgdsp0mw4kheak/Screenshot%202015-02-24%2018.47.32.png?dl=0
You can see that the grass that is positioned in front is actually behind the one that is actually positioned in front. I have tried using...
Globals.device.BlendState = BlendState.Opaque;
Globals.device.DepthStencilState = DepthStencilState.Default;
Globals.device.RasterizerState = RasterizerState.CullNone;
but it didnt work. Thanks in advance! Any ideas?
DepthStencilState
,BlendState
andRasterizerState
values at the beginning of each frame, remembering thatSpriteBatch.Begin()
sets these values toDepthStencilState.None
,BlendState.AlphaBlend
andRasterizerState.CullCounterClockwise
(source: msdn.microsoft.com/en-us/library/bb195108.aspx). If you want a good answer, post your code. \$\endgroup\$