Jump to content

  • Log In with Google      Sign In   
  • Create Account

Max viewing distance problems


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Deortuka   Members   -  Reputation: 493

Like
0Likes
Like

Posted 21 June 2012 - 05:07 AM

I am completely stumped on how to change the maximum viewing distance in DirectX 11. I have tried playing around with the depth stencil texture format and increasing the the farZ parameter of XMMatrixPerspectiveFovLH() and have gotten no changes at all. How do you increase the maximum viewing distance?

The map in these screenshots is a popular custom map from the game Killing Floor. I replaced the textures that would not export properly with a 1x1 pixel all white texture, explaining the all white ceiling. The black area shows where the clipping is occurring (the clear color is black). I simply exported it from UnrealEd as an .obj file and used that as the input for my engine's map compiler. I am using this only as a test map until I start modeling my own maps. The player is, temporarily, 75 units tall. The scale is 1 unit = 2 cm (Unreal's scale) but I will shift to a 1 : 1 scale for my personal maps, which would make this clipping effect even worse.

Posted Image
Posted Image
Posted Image

Edited by Deortuka, 21 June 2012 - 05:12 AM.


Sponsor:

#2 Deortuka   Members   -  Reputation: 493

Like
0Likes
Like

Posted 21 June 2012 - 03:24 PM

Turns out that setting the farZ parameter in XMMatrixPerspectiveFovLH() is, in fact, the correct way to solve this problem. The values I passed were getting scrambled because of a bad cast. Took a day of trial and error but I managed to find and fix the problem.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS