Navigation
API > API/Runtime > API/Runtime/Renderer
References
| Module | Renderer |
| Header | /Engine/Source/Runtime/Renderer/Public/ScreenPass.h |
| Include | #include "ScreenPass.h" |
Syntax
struct FScreenTransform
Remarks
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); }
Variables
| Type | Name | Description | |
|---|---|---|---|
| FVector2f | Bias | ||
| FVector2f | Scale |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FScreenTransform
(
const FVector2f& InScale, |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FScreenTransform | ChangeRectFromTo
(
const FIntRect& SrcViewport, |
||
| FScreenTransform | ChangeRectFromTo
(
FVector2f SourceOffset, |
Change of coordinate to map from a rectangle to another. | |
| FScreenTransform | ChangeTextureBasisFromTo
(
const FScreenPassTextureViewport& TextureViewport, |
||
| FScreenTransform | ChangeTextureBasisFromTo
(
const FScreenPassTexture& Texture, |
||
| FScreenTransform | ChangeTextureBasisFromTo
(
const FIntPoint& TextureExtent, |
Change of basis for texture coordinate. | |
| FScreenTransform | ChangeTextureUVCoordinateFromTo
(
const FScreenPassTextureViewport& SrcViewport, |
Change TextureUV coordinate from one texture to another, taking into account change in texture extent too. | |
| FScreenTransform | DispatchThreadIdToViewportUV
(
const FIntRect& SrcViewport |
||
| FScreenTransform | Invert
(
const FScreenTransform& AToB |
Invert a transformation AToB to BToA. | |
| FScreenTransform | SvPositionToViewportUV
(
const FIntRect& SrcViewport |
Enums
| Type | Name | Description | |
|---|---|---|---|
| ETextureBasis | Different texture coordinate basis. |
Constants
| Name | Description |
|---|---|
| Identity | A * FScreenTransform::Identity = A. |
| ScreenPosToViewportUV | Transforms ScreenPos to/from ViewportUV. |
| ViewportUVToScreenPos |