• Advertisement
Sign in to follow this  

Max viewing distance problems

This topic is 2036 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 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.

[img]http://s13.postimage.org/y351fuwud/Untitled.png[/img]
[img]http://s7.postimage.org/gxwyiq3nd/Untitled1.png[/img]
[img]http://s16.postimage.org/59id3fypv/Untitled2.png[/img] Edited by Deortuka

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


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

  • Advertisement