UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IStereoRendering Class Referenceabstract

#include <StereoRendering.h>

+ Inheritance diagram for IStereoRendering:

Public Member Functions

virtual ~IStereoRendering ()
 
virtual bool IsStereoEnabled () const =0
 
virtual bool IsStereoEnabledOnNextFrame () const
 
virtual bool EnableStereo (bool stereo=true)=0
 
virtual int32 GetDesiredNumberOfViews (bool bStereoRequested) const
 
virtual EStereoscopicPass GetViewPassForIndex (bool bStereoRequested, int32 ViewIndex) const
 
virtual uint32 GetLODViewIndex () const
 
virtual bool IsStandaloneStereoOnlyDevice () const
 
virtual void AdjustViewRect (const int32 ViewIndex, int32 &X, int32 &Y, uint32 &SizeX, uint32 &SizeY) const =0
 
virtual void SetFinalViewRect (class FRHICommandListImmediate &RHICmdList, const int32 ViewIndex, const FIntRect &FinalViewRect)
 
virtual FVector2D GetTextSafeRegionBounds () const
 
virtual void CalculateStereoViewOffset (const int32 ViewIndex, FRotator &ViewRotation, const float WorldToMeters, FVector &ViewLocation)=0
 
virtual FMatrix GetStereoProjectionMatrix (const int32 ViewIndex) const =0
 
virtual void InitCanvasFromView (class FSceneView *InView, class UCanvas *Canvas)=0
 
virtual void RenderTexture_RenderThread (class FRHICommandListImmediate &RHICmdList, class FRHITexture *BackBuffer, class FRHITexture *SrcTexture, FVector2D WindowSize) const final
 
virtual ENGINE_API void RenderTexture_RenderThread (class FRDGBuilder &GraphBuilder, FRDGTextureRef BackBuffer, FRDGTextureRef SrcTexture, FVector2f WindowSize) const
 
virtual IStereoRenderTargetManagerGetRenderTargetManager ()
 
virtual IStereoLayersGetStereoLayers ()
 
virtual void StartFinalPostprocessSettings (struct FPostProcessSettings *StartPostProcessingSettings, const enum EStereoscopicPass StereoPassType, const int32 StereoViewIndex)
 
virtual bool OverrideFinalPostprocessSettings (struct FPostProcessSettings *OverridePostProcessingSettings, const enum EStereoscopicPass StereoPassType, const int32 StereoViewIndex, float &BlendWeight)
 
virtual void EndFinalPostprocessSettings (struct FPostProcessSettings *FinalPostProcessingSettings, const enum EStereoscopicPass StereoPassType, const int32 StereoViewIndex)
 

Static Public Member Functions

static bool IsStereoEyePass (EStereoscopicPass Pass)
 
static ENGINE_API bool IsStereoEyeView (const FSceneView &View)
 
static bool IsAPrimaryPass (EStereoscopicPass Pass)
 
static ENGINE_API bool IsAPrimaryView (const FSceneView &View)
 
static bool IsASecondaryPass (EStereoscopicPass Pass)
 
static ENGINE_API bool IsASecondaryView (const FSceneView &View)
 
static ENGINE_API bool IsStartInVR ()
 

Constructor & Destructor Documentation

◆ ~IStereoRendering()

virtual IStereoRendering::~IStereoRendering ( )
inlinevirtual

Member Function Documentation

◆ AdjustViewRect()

virtual void IStereoRendering::AdjustViewRect ( const int32  ViewIndex,
int32 X,
int32 Y,
uint32 SizeX,
uint32 SizeY 
) const
pure virtual

Adjusts the viewport rectangle for stereo, based on which eye pass is being rendered.

Implemented in FFakeStereoRenderingDevice.

◆ CalculateStereoViewOffset()

virtual void IStereoRendering::CalculateStereoViewOffset ( const int32  ViewIndex,
FRotator ViewRotation,
const float  WorldToMeters,
FVector ViewLocation 
)
pure virtual

Calculates the offset for the camera position, given the specified position, rotation, and world scale Specifying eSSE_MONOSCOPIC for the view index returns a center offset behind the stereo views

Implemented in FFakeStereoRenderingDevice.

◆ EnableStereo()

virtual bool IStereoRendering::EnableStereo ( bool  stereo = true)
pure virtual

Switches stereo rendering on / off. Returns current state of stereo.

Returns
Returns current state of stereo (true / false).

Implemented in FFakeStereoRenderingDevice.

◆ EndFinalPostprocessSettings()

virtual void IStereoRendering::EndFinalPostprocessSettings ( struct FPostProcessSettings FinalPostProcessingSettings,
const enum EStereoscopicPass  StereoPassType,
const int32  StereoViewIndex 
)
inlinevirtual

◆ GetDesiredNumberOfViews()

virtual int32 IStereoRendering::GetDesiredNumberOfViews ( bool  bStereoRequested) const
inlinevirtual

Returns the desired number of views, so that devices that require additional views can allocate them. Default is two viewports if using stereo rendering.

Reimplemented in FFakeStereoRenderingDevice.

◆ GetLODViewIndex()

virtual uint32 IStereoRendering::GetLODViewIndex ( ) const
inlinevirtual

Return the index of the view that is used for selecting LODs

◆ GetRenderTargetManager()

virtual IStereoRenderTargetManager * IStereoRendering::GetRenderTargetManager ( )
inlinevirtual

Returns currently active render target manager.

Reimplemented in FFakeStereoRenderingDevice.

◆ GetStereoLayers()

virtual IStereoLayers * IStereoRendering::GetStereoLayers ( )
inlinevirtual

Returns an IStereoLayers implementation, if one is present

◆ GetStereoProjectionMatrix()

virtual FMatrix IStereoRendering::GetStereoProjectionMatrix ( const int32  ViewIndex) const
pure virtual

Gets a projection matrix for the device, given the specified view index Specifying eSSE_MONOSCOPIC for the view index returns a center projection matrix encompassing all views

Implemented in FFakeStereoRenderingDevice.

◆ GetTextSafeRegionBounds()

virtual FVector2D IStereoRendering::GetTextSafeRegionBounds ( ) const
inlinevirtual

Gets the percentage bounds of the safe region to draw in. This allows things like stat rendering to appear within the readable portion of the stereo view.

Returns
The centered percentage of the view that is safe to draw readable text in

◆ GetViewPassForIndex()

virtual EStereoscopicPass IStereoRendering::GetViewPassForIndex ( bool  bStereoRequested,
int32  ViewIndex 
) const
inlinevirtual

For the specified view index in the view family, assign a stereoscopic pass type based on the extension's usage

Reimplemented in FFakeStereoRenderingDevice.

◆ InitCanvasFromView()

virtual void IStereoRendering::InitCanvasFromView ( class FSceneView InView,
class UCanvas Canvas 
)
pure virtual

Sets view-specific params (such as view projection matrix) for the canvas.

Implemented in FFakeStereoRenderingDevice.

◆ IsAPrimaryPass()

static bool IStereoRendering::IsAPrimaryPass ( EStereoscopicPass  Pass)
inlinestatic

Static helper. Return true if this pass is for a view we do all the work for (ie this view can't borrow from another)

◆ IsAPrimaryView()

bool IStereoRendering::IsAPrimaryView ( const FSceneView View)
static

Static helper. Return true if primary view

◆ IsASecondaryPass()

static bool IStereoRendering::IsASecondaryPass ( EStereoscopicPass  Pass)
inlinestatic

Static helper. Return true if this pass is for a view for which we share some work done for eSSP_PRIMARY (ie borrow some intermediate state from that view)

◆ IsASecondaryView()

bool IStereoRendering::IsASecondaryView ( const FSceneView View)
static

Static helper. Return true if secondary view

◆ IsStandaloneStereoOnlyDevice()

virtual bool IStereoRendering::IsStandaloneStereoOnlyDevice ( ) const
inlinevirtual

True when a device has only stereo display (like a self contained mobile vr headset).

◆ IsStartInVR()

bool IStereoRendering::IsStartInVR ( )
static

Static helper. Return true if the Start in VR setting is set to true, or if we have the "-vr" commandline argument

◆ IsStereoEnabled()

virtual bool IStereoRendering::IsStereoEnabled ( ) const
pure virtual

Whether or not stereo rendering is on this frame.

Implemented in FFakeStereoRenderingDevice.

◆ IsStereoEnabledOnNextFrame()

virtual bool IStereoRendering::IsStereoEnabledOnNextFrame ( ) const
inlinevirtual

Whether or not stereo rendering is on on next frame. Useful to determine if some preparation work should be done before stereo got enabled in next frame.

◆ IsStereoEyePass()

static bool IStereoRendering::IsStereoEyePass ( EStereoscopicPass  Pass)
inlinestatic

Static helper. Return true if this pass is for a stereo eye view

◆ IsStereoEyeView()

bool IStereoRendering::IsStereoEyeView ( const FSceneView View)
static

Static helper. Return true if this is a stereoscopic view

◆ OverrideFinalPostprocessSettings()

virtual bool IStereoRendering::OverrideFinalPostprocessSettings ( struct FPostProcessSettings OverridePostProcessingSettings,
const enum EStereoscopicPass  StereoPassType,
const int32  StereoViewIndex,
float BlendWeight 
)
inlinevirtual

◆ RenderTexture_RenderThread() [1/2]

void IStereoRendering::RenderTexture_RenderThread ( class FRDGBuilder GraphBuilder,
FRDGTextureRef  BackBuffer,
FRDGTextureRef  SrcTexture,
FVector2f  WindowSize 
) const
virtual

Reimplemented in FFakeStereoRenderingDevice.

◆ RenderTexture_RenderThread() [2/2]

virtual void IStereoRendering::RenderTexture_RenderThread ( class FRHICommandListImmediate RHICmdList,
class FRHITexture BackBuffer,
class FRHITexture SrcTexture,
FVector2D  WindowSize 
) const
inlinefinalvirtual

◆ SetFinalViewRect()

virtual void IStereoRendering::SetFinalViewRect ( class FRHICommandListImmediate RHICmdList,
const int32  ViewIndex,
const FIntRect FinalViewRect 
)
inlinevirtual

Provides the final view rect that the renderer will render into.

Reimplemented in FFakeStereoRenderingDevice.

◆ StartFinalPostprocessSettings()

virtual void IStereoRendering::StartFinalPostprocessSettings ( struct FPostProcessSettings StartPostProcessingSettings,
const enum EStereoscopicPass  StereoPassType,
const int32  StereoViewIndex 
)
inlinevirtual

The documentation for this class was generated from the following files: