Navigation
API > API/Runtime > API/Runtime/Renderer
Generic affine 2D texture coordinate transformation x * S + B.
Construct: FVector2f PointInA = ...; FVector2f PointInB = PointInA * Scale0 + Bias0;
FScreenTransform AToB(Scale0, Bias0); FVector2f PointInB = PointInA * AToB;
Associativity: FVector2f PointInA = ...; FScreenTransform AToB = ...; FScreenTransform BToC = ...; FVector2f PointInC = (PointInA * AToB) * BToC;
FScreenTransform AToC = AToB * BToC; FVector2f PointInC = PointInA * AToC;
Explicit construction by factorization: FVector2f PointInA = ...; FVector2f PointInB = PointInA * Scale0 + Bias0; FVector2f PointInC = PointInB * Scale1 + Bias1;
FScreenTransform AToC = (FScreenTransform::Identity * Scale0 + Bias0) * Scale1 + Bias1; FVector2f PointInC = PointInA * AToC;
Shader code: #include "/Engine/Private/ScreenPass.ush"
FScreenTransform AToC; // shader parameter in global scope
{ float2 PointInA = ...; float2 PointInC = ApplyScreenTransform(PointInA, AToC); }
| Name | FScreenTransform |
| Type | struct |
| Header File | /Engine/Source/Runtime/Renderer/Public/ScreenPass.h |
| Include Path | #include "ScreenPass.h" |
Syntax
struct FScreenTransform
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| ScreenPass.h | |||
FScreenTransform
(
const FVector2f& InScale, |
ScreenPass.h |
Enums
Public
| Name | Remarks |
|---|---|
| ETextureBasis | Different texture coordinate basis. |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Identity | const FScreenTransform | A * FScreenTransform::Identity = A. | ScreenPass.h |
| ScreenPosToViewportUV | const FScreenTransform | Transforms ScreenPos to/from ViewportUV. | ScreenPass.h |
| ViewportUVToScreenPos | const FScreenTransform | ScreenPass.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Bias | FVector2f | ScreenPass.h | ||
| Scale | FVector2f | ScreenPass.h |
Functions
Public
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FScreenTransform ChangeRectFromTo
(
const FIntRect& SrcViewport, |
ScreenPass.h | ||
static FScreenTransform ChangeRectFromTo
(
FVector2f SourceOffset, |
Change of coordinate to map from a rectangle to another. | ScreenPass.h | |
static FScreenTransform ChangeTextureBasisFromTo
(
const FScreenPassTextureViewport& TextureViewport, |
ScreenPass.h | ||
static FScreenTransform ChangeTextureBasisFromTo
(
const FScreenPassTexture& Texture, |
ScreenPass.h | ||
static FScreenTransform ChangeTextureBasisFromTo
(
const FIntPoint& TextureExtent, |
Change of basis for texture coordinate. | ScreenPass.h | |
static FScreenTransform ChangeTextureUVCoordinateFromTo
(
const FScreenPassTextureViewport& SrcViewport, |
Change TextureUV coordinate from one texture to another, taking into account change in texture extent too. | ScreenPass.h | |
static FScreenTransform DispatchThreadIdToViewportUV
(
const FIntRect& SrcViewport |
ScreenPass.h | ||
static FScreenTransform Invert
(
const FScreenTransform& AToB |
Invert a transformation AToB to BToA. | ScreenPass.h | |
static FScreenTransform SvPositionToViewportUV
(
const FIntRect& SrcViewport |
ScreenPass.h |