FarPlaneDistance for FirstPersonCamera?
#2
You are right, the DXEngine automatically calculates the near and far plane distances so that they are as close together as possible. This increases the depth resolution and minimizes the z-fighting artifacts. Anyway, if you want to manually control the near and far plane values, you need to set the OptimizeNearAndFarCameraPlanes  to false (this is a property on th DXScene object).

If you are using DXViewportView, then you can get the DXScene from its DXScene property. The property is set when the DirectX device is initialized - you can subscribe DXSceneDeviceCreated event to be notified when this happens:

Code:
_dxViewportView.DXSceneDeviceCreated += delegate(object sender, EventArgs args)
{
   if (_dxViewportView.DXScene != null) // Can be null in WPF 3D rendering (used as fallback by default)
       _dxViewportView.DXScene.OptimizeNearAndFarCameraPlanes = false;
};
Andrej Benedik
  


Messages In This Thread
RE: FarPlaneDistance for FirstPersonCamera? - by abenedik - 08-06-2019, 09:57 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)