• Advertisement
Sign in to follow this  

Blending not wished

This topic is 3373 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

Hello, i'm having got a very strange problem. Simple using the most simple shader (Position and Texture mapping), there is this result. http://img379.imageshack.us/img379/7181/asdho6.jpg But as you can see, the eyes are visible even if they are behind face of Dino. What can be the problem? There is not any kind of blending active...!

Share this post


Link to post
Share on other sites
Advertisement
You have to turn on the zbuffer

[Edited by - J-Fox on November 23, 2008 1:14:24 PM]

Share this post


Link to post
Share on other sites
Wow...
I found the trouble


Testo->PreloadText("Non Instanced Mode",-1);
TestoI->PreloadText("Instanced Mode Enabled",-1);


Testo and TestoI are ID3DX10Font.

They make a mistake with the ID3D10Device (i do not know why).
To fix it, make a stateblock and


StateBlock->Capture();
Testo->PreloadText("Non Instanced Mode",-1);
TestoI->PreloadText("Instanced Mode Enabled",-1);
StateBlock->Apply();

Share this post


Link to post
Share on other sites
Quote:
Original post by XVincentX
Wow...
I found the trouble


Testo->PreloadText("Non Instanced Mode",-1);
TestoI->PreloadText("Instanced Mode Enabled",-1);


Testo and TestoI are ID3DX10Font.

They make a mistake with the ID3D10Device (i do not know why).
To fix it, make a stateblock and


StateBlock->Capture();
Testo->PreloadText("Non Instanced Mode",-1);
TestoI->PreloadText("Instanced Mode Enabled",-1);
StateBlock->Apply();


My guess is that PreloadText() messes with the internal states on the graphics device which, in turn, messes with the rendering of your model in some way. (In this case, messes with the Z-buffering as was mentioned before.)

Stateblocks allow you to save graphics device states and restore them later, which is why that solution works.

Share this post


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

  • Advertisement