Jump to content
  • Advertisement
Sign in to follow this  
aravind

Problem with perspective view

This topic is 2010 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 am new to directx c#. i have a problem in one project. i draw two cubes which is one after another (ie x and y same location z is different), but the problem is when i view the first shape it is transparent and back cube is showed , i checked the transparency, no transparent level has been set. cullmode=null,Can anyone suggest what was the problem in tat?

 

here the screen shots

 

Front Facing: http://postimg.org/image/6irstpv75/
rear Facing :http://postimg.org/image/tyz5v3av3/
Side View:http://postimg.org/image/fmabaig8v/
Top View:http://postimg.org/image/o7ktw54h3/

Edited by aravind

Share this post


Link to post
Share on other sites
Advertisement

A screenshot might help. In particular, I wonder if the front cube is really transparent, or whether the front cube and back cube are actually opaque, but the problem is that the back cube is drawn on top of the front cube.

 

If so, then perhaps the z-write/z-test is not working, which could be because the depth buffer isn't setup correctly, z-testing or z-writing is disabled, or because the perspective matrix is setup incorrectly.

Share this post


Link to post
Share on other sites

sound like cull mode or depth buffer to me, to a beginner it can be very difficult to interpret

Edited by Stainless

Share this post


Link to post
Share on other sites

if it was the z test,i would think the edges of the front cube would be visible around the back cube. are you using two different index buffers? are you making sure to bind the index buffers before you draw the objects?

Share this post


Link to post
Share on other sites

Maybe the front cube is too close to the camera and is outside the viewing frustum? What's your near plane value, and how far is the cube from the camera?

Share this post


Link to post
Share on other sites

@ iedoc. yes i am using backbuffer too. can u pls xplain how to  bind the index buffers and what wat that ztest?

Share this post


Link to post
Share on other sites

@ colombo ,here admin restricted the screenshoots man., .. front and back cubes are drawn correctly and i didnt have any idea about the ztest how can i set it up?..

Share this post


Link to post
Share on other sites

@stainles: Cull mode is set to none,,, ya i too think i'm having depth buffer problem it just overlaps the back cube pixels with the front cube...

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!