nn::ulcd::CTR::StereoCamera::GetMaxParallax Member Function#include <nn/ulcd.h>
f32 GetMaxParallax(
void
) const;
None.
Gets the parallax at the farthest possible distance, as the ratio of the parallax to the screen width.
It calculates and returns the left/right offset of an object located at infinity as seen by the left and right cameras, relative to the base camera. This offset is expressed as a percentage (1.0f = 100%).
For example, let's assume you are rendering a distant landscape as a single image. You can make the landscape appear to be at the farthest possible depth by offsetting this image by [return value]×[screen width] pixels to the left and right.
However, infinity in terms of this function is the distant position that the player senses when a limited parallax is specified by the SetLimitParallax function. The calculated offset follows the 3D volume values.
When using the application-priority method, you will never exceed the infinity of this function. With the reality-priorty method, however, caution is needed because it is possible to apply a parallax that it is greater than the offfset that can be derived by this function.
The calculations made by this function are based on the results obtained during the last call to either CalculateMatrices or CalculateMatricesReal.
CONFIDENTIAL