Inverse Projection Calculation - Philips DirectX Visualizer User Manual

Directx visualizer
Table of Contents

Advertisement

DirectX Visualizer
Z-buffer values within the range of interest. Any values outside the range of interest are clipped to the
closest extreme of the range of interest.
Option name
Option name
Option name
Option name
ZNearInterest
ZNearInterestDownKey
ZNearInterestUpKey
ZFarInterest
ZFarInterestDownKey
ZFarInterestUpKey
6.12
6.12
6.12
6.12

Inverse projection calculation

By default the Visualizer will use the inverse of the Direct3D projection matrix to calculate the Z
coordinates from the value in the Z-buffer. If the projection matrix cannot be inverted, an
approximation will be used instead. The Visualizer will write a warning message about this to the log if
logging is enabled (see Figure 6). It is recommended to test the application at least once with logging
enabled to see if this warning is given.
End of InitShaders
Warning: inverse projection matrix not valid; using approximation.
DllMain DLL_THREAD_ATTACH
Warning: Switched back to using inverse projection matrix.
DllMain DLL_THREAD_DETACH
If this warning is generated while the application is showing a 3D scene, then the approximation needs
to be tuned to still result in an acceptable 3D effect. For this purpose DynamicZtoD can be set to 0,
which will force the Visualizer to always use the approximation and allow you to determine an
acceptable FarNearRatio. The value of FarNearRatio only influences the approximation and has no
effect if the inverse projection matrix is used.
To determine the appropriate value for FarNearRatio it is recommended to:
1. run the application with EnableLogging=1, DynamicZtoD=0, EnableDepthTuningHelp=1 and
ZRange keys defined to usable values
2. change the FarNearRatio using the ZRangeUpKey and ZRangeDownKey to find a satisfactory
value
3. read the last used FarNearRatio value from the log file
4. set the chosen FarNearRatio value in the configuration file
©2005-2009 Philips Electronics Nederland B.V.
Possible values
Possible values
Possible values
Possible values
Default value
Default value
Default value
Default value
floating point value
0.0
between 0.0 and
1.0
key
disabled
key
disabled
floating point value
1.0
between 0.0 and
1.0
key
disabled
key
disabled
Figure 6: log file fragment including warning
Description
Description
Description
Description
Smallest Z-buffer value of interest
Key that decreases ZNearInterest
Key that increases ZNearInterest
Largest Z-buffer value of interest
Key that decreases ZFarInterest
Key that increases ZFarInterest
3D Solutions
01 April 2009
17 of 26

Advertisement

Table of Contents
loading

Table of Contents