Sign in to follow this  
rgibson11

[Solved] 2 DirectX10 questions

Recommended Posts

1: For some reason when I look up through a transparent surface (blending) I cant see my sky which is a cube map. but when I look down through a transparent surface I can see the ground (this is water). What could be the problem here, I'm sure its just something small I am missing. 2: How can I alter the clipping distance so I can see objects pretty far away, altering the D3DXMatrixPerspectiveFovLH values doesn't seem to help. Or is there a set value for this and there's no way to see beyond a certain point, I have a large map. thanks [Edited by - rgibson11 on July 22, 2009 8:31:43 PM]

Share this post


Link to post
Share on other sites
1. Do you draw the skybox first, and later the transparent surface?
If not, your transparent surface might write to the depth-buffer, causing later drawing behind it to fail. If that's not the case it's hard to say.. might be something wrong with your blend-state or something, you need to post some code.

2. Sounds strange, the projection matrix is supposed to do it. How large is the map?
Also make sure to set the min and max Z values in your viewport to 0.0 and 1.0. You probably need to post some code here too for more help. =)

Share this post


Link to post
Share on other sites
fixed first one :) thanks +rep

the second problem is still not fixed, my viewport is set to 0.0f, 1.0f and the znear and zfar of projection are currently 0.5f, 10000.0f, if its 0.5f, 1000.0f, then the sky doesn't show, its quite weird because the hills still get clipped but the sky is further than the hills, so I dont know :S

-edit: nvm stupid me, the skybox was the thing clipping it, forgot to change it after I increased map size.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this