FMaterialCompiler

The interface used to translate material expressions into executable code.

Windows
MacOS
Linux

Inheritance Hierarchy

FMaterialCompiler

FProxyMaterialCompiler

Syntax

class FMaterialCompiler

Remarks

The interface used to translate material expressions into executable code. Note: Most member functions should be pure virtual to force a FProxyMaterialCompiler override!

Destructors

Name Description

Public function Virtual

~FMaterialCompiler()

Functions

Name Description

Public function

int32

 

Abs

(
    int32 X
)

Public function

int32

 

AccessCollectionParameter

(
    UMaterialParameterCollection* ...,
    int32 ParameterIndex,
    int32 ComponentIndex
)

Public function

int32

 

ActorWorldPosition()

Public function

int32

 

Add

(
    int32 A,
    int32 B
)

Public function

int32

 

AntialiasedTextureMask

(
    int32 Tex,
    int32 UV,
    float Threshold,
    uint8 Channel
)

Public function

void

 

AppendExpressionError

(
    UMaterialExpression* Expressio...,
    const TCHAR* Text
)

Public function

int32

 

AppendVector

(
    int32 A,
    int32 B
)

Public function

int32

 

Arccosine

(
    int32 X
)

Public function

int32

 

ArccosineFast

(
    int32 X
)

Public function

int32

 

Arcsine

(
    int32 X
)

Public function

int32

 

ArcsineFast

(
    int32 X
)

Public function

int32

 

Arctangent

(
    int32 X
)

Public function

int32

 

Arctangent2

(
    int32 Y,
    int32 X
)

Public function

int32

 

Arctangent2Fast

(
    int32 Y,
    int32 X
)

Public function

int32

 

ArctangentFast

(
    int32 X
)

Public function

int32

 

AtmosphericFogColor

(
    int32 WorldPosition
)

Public function

int32

 

AtmosphericLightColor()

Public function

int32

 

AtmosphericLightVector()

Public function

int32

 

BlackBody

(
    int32 Temp
)

Public function

int32

 

CallExpression

(
    FMaterialExpressionKey ExpressionKe...,
    FMaterialCompiler* InCompiler
)

Public function

int32

 

CameraVector()

Public function

int32

 

Ceil

(
    int32 X
)

Public function

int32

 

Clamp

(
    int32 X,
    int32 A,
    int32 B
)

Public function

int32

 

ComponentMask

(
    int32 Vector,
    bool R,
    bool G,
    bool B,
    bool A
)

Public function

int32

 

Constant

(
    float X
)

Public function

int32

 

Constant2

(
    float X,
    float Y
)

Public function

int32

 

Constant3

(
    float X,
    float Y,
    float Z
)

Public function

int32

 

Constant4

(
    float X,
    float Y,
    float Z,
    float W
)

Public function

int32

 

Cosine

(
    int32 X
)

Public function

int32

 

Cross

(
    int32 A,
    int32 B
)

Public function

int32

 

CustomExpression

(
    UMaterialExpressionCustom* Cus...,
    TArray< int32 >& CompiledInputs
)

Public function

int32

 

CustomOutput

(
    UMaterialExpressionCustomOutput...,
    int32 OutputIndex,
    int32 OutputCode
)

Public function

int32

 

DDX

(
    int32 X
)

Public function

int32

 

DDY

(
    int32 X
)

Public function

int32

 

DecalLifetimeOpacity()

Public function

int32

 

DeltaTime()

Public function

int32

 

DepthOfFieldFunction

(
    int32 Depth,
    int32 FunctionValueIndex
)

Public function

int32

 

DistanceCullFade()

Public function

int32

 

DistanceFieldGradient

(
    int32 PositionArg
)

Public function

int32

 

DistanceToNearestSurface

(
    int32 PositionArg
)

Public function

int32

 

Div

(
    int32 A,
    int32 B
)

Public function

int32

 

Dot

(
    int32 A,
    int32 B
)

Public function

int32

 

DynamicParameter

(
    FLinearColor& DefaultValue,
    uint32 ParameterIndex
)

Public function

int32

 

Error

(
    const TCHAR* Text
)

Public function

int32

 

Errorf

(
    const TCHAR* Format,
    ...
)

Public function

int32

 

ExternalTexture

(
    UTexture* InTexture,
    int32& TextureReferenceIndex
)

Public function

int32

 

ExternalTexture

(
    const FGuid& ExternalTextureGuid
)

Public function

int32

 

ExternalTexture

(
    UTexture* DefaultTexture
)

Public function

int32

 

ExternalTextureCoordinateOffset

(
    const FGuid& ExternalTextureGuid
)

Public function

int32

 

ExternalTextureCoordinateOffset

(
    int32 TextureReferenceIndex,
    TOptional< FName > ParameterName
)

Public function

int32

 

ExternalTextureCoordinateScaleRotation

(
    const FGuid& ExternalTextureGuid
)

Public function

int32

 

ExternalTextureCoordinateScaleRotation

(
    int32 TextureReferenceIndex,
    TOptional< FName > ParameterName
)

Public function

int32

 

ExternalTextureParameter

(
    FName ParameterName,
    UTexture* DefaultTexture
)

Public function

int32

 

ExternalTextureParameter

(
    FName ParameterName,
    UTexture* DefaultValue,
    int32& TextureReferenceIndex
)

Public function

int32

 

EyeAdaptation()

Public function

int32

 

Floor

(
    int32 X
)

Public function

int32

 

Fmod

(
    int32 A,
    int32 B
)

Public function

int32

 

ForceCast

(
    int32 Code,
    EMaterialValueType DestType,
    uint32 ForceCastFlags
)

Public function

int32

 

Frac

(
    int32 X
)

Public function

int32

 

GameTime

(
    bool bPeriodic,
    float Period
)

Public function

int32

 

GetCurrentFunctionStackDepth()

Public function Const

EShaderFrequ...

 

GetCurrentShaderFrequency()

Gets value stored by SetMaterialProperty()

Public function

ERHIFeatureL...

 

GetFeatureLevel()

Public function

const FGuid

 

GetMaterialAttribute()

Gets the current top of the MaterialAttributes property stack.

Public function Const

EMaterialSha...

 

GetMaterialShadingModel()

Public function Const

EMaterialVal...

 

GetParameterType

(
    int32 Index
)

Public function Const

FMaterialUni...

 

GetParameterUniformExpression

(
    int32 Index
)

Public function

int32

 

GetPixelPosition()

Public function

EMaterialQua...

 

GetQualityLevel()

Public function Virtual

UTexture ...

 

GetReferencedTexture

(
    int32 Index
)

Public function

int32

 

GetSceneTextureViewSize

(
    int32 SceneTextureId,
    bool InvProperty
)

Public function

EShaderPlatf...

 

GetShaderPlatform()

Public function

bool

 

GetStaticBoolValue

(
    int32 BoolIndex,
    bool& bSucceeded
)

Public function Virtual

int32

 

GetTextureReferenceIndex

(
    UTexture* Texture
)

Public function

EMaterialVal...

 

GetType

(
    int32 Code
)

Public function

int32

 

GetViewportUV()

Public function

int32

 

GIReplace

(
    int32 Direct,
    int32 StaticIndirect,
    int32 DynamicIndirect
)

Public function

int32

 

If

(
    int32 A,
    int32 B,
    int32 AGreaterThanB,
    int32 AEqualsB,
    int32 ALessThanB,
    int32 Threshold
)

Public function Virtual Const

bool

 

IsCurrentlyCompilingForPreviousFrame()

The compiler can run in a different state and this affects caching of sub expression, Expressions are different (e.g. View.PrevWorldViewOrigin) when using previous frame's values If possible we should re-factor this to avoid having to deal with compiler state

Public function Virtual Const

bool

 

IsDevelopmentFeatureEnabled

(
    const FName& FeatureName
)

Public function

int32

 

Length

(
    int32 X
)

Public function

int32

 

Lerp

(
    int32 X,
    int32 Y,
    int32 A
)

Public function

int32

 

LightmapUVs()

Public function

int32

 

LightmassReplace

(
    int32 Realtime,
    int32 Lightmass
)

Public function

int32

 

LightVector()

Public function

int32

 

Logarithm10

(
    int32 X
)

Public function

int32

 

Logarithm2

(
    int32 X
)

Public function

int32

 

MaterialBakingWorldPosition()

Public function

int32

 

MaterialProxyReplace

(
    int32 Realtime,
    int32 MaterialProxy
)

Public function

int32

 

Max

(
    int32 A,
    int32 B
)

Public function

int32

 

Min

(
    int32 A,
    int32 B
)

Public function

int32

 

Mul

(
    int32 A,
    int32 B
)

Public function

int32

 

Noise

(
    int32 Position,
    float Scale,
    int32 Quality,
    uint8 NoiseFunction,
    bool bTurbulence,
    int32 Levels,
    float OutputMin,
    float OutputMax,
    float LevelScale,
    int32 FilterWidth,
    bool bTiling,
    uint32 RepeatSize
)

Public function

int32

 

ObjectBounds()

Public function

int32

 

ObjectOrientation()

Public function

int32

 

ObjectRadius()

Public function

int32

 

ObjectWorldPosition()

Public function

int32

 

ParticleColor()

Public function

int32

 

ParticleDirection()

Public function

int32

 

ParticleMacroUV()

Public function

int32

 

ParticleMotionBlurFade()

Public function

int32

 

ParticlePosition()

Public function

int32

 

ParticleRadius()

Public function

int32

 

ParticleRandom()

Public function

int32

 

ParticleRelativeTime()

Public function

int32

 

ParticleSize()

Public function

int32

 

ParticleSpeed()

Public function

int32

 

ParticleSubUV

(
    int32 TextureIndex,
    EMaterialSamplerType SamplerType,
    bool bBlend
)

Public function

int32

 

PerInstanceFadeAmount()

Public function

int32

 

PerInstanceRandom()

Public function Virtual

int32

 

PeriodicHint

(
    int32 PeriodicCode
)

Public function

int32

 

PixelDepth()

Public function

int32

 

PixelNormalWS()

Public function

FMaterialFun...

 

PopFunction()

Pops a function from the compiler's function stack, which indicates that compilation is leaving a function.

Public function

FGuid

 

PopMaterialAttribute()

Pops a MaterialAttributes property off the stack.

Public function

FMaterialPar...

 

PopParameterOwner()

Pops a parameter owner off the stack.

Public function

int32

 

Power

(
    int32 Base,
    int32 Exponent
)

Public function

int32

 

PrecomputedAOMask()

Public function

int32

 

PreSkinnedNormal()

Public function

int32

 

PreSkinnedPosition()

Public function

void

 

PushFunction

Pushes a function onto the compiler's function stack, which indicates that compilation is entering a function.

Public function

void

 

PushMaterialAttribute

(
    const FGuid& InAttributeID
)

Pushes a material attributes property onto the stack.

Public function

void

 

PushParameterOwner

(
    const FMaterialParameterInfo& InOw...
)

Pushes a parameter owner onto the stack.

Public function

int32

 

RayTracingQualitySwitchReplace

(
    int32 Normal,
    int32 RayTraced
)

Public function

int32

 

RealTime

(
    bool bPeriodic,
    float Period
)

Public function

int32

 

ReflectionAboutCustomWorldNormal

(
    int32 CustomWorldNormal,
    int32 bNormalizeCustomWorldNormal
)

Public function

int32

 

ReflectionVector()

Public function

int32

 

RotateAboutAxis

(
    int32 NormalizedRotationAxisAndAngl...,
    int32 PositionOnAxisIndex,
    int32 PositionIndex
)

Public function

int32

 

RotateScaleOffsetTexCoords

(
    int32 TexCoordCodeIndex,
    int32 RotationScale,
    int32 Offset
)

Public function

int32

 

Round

(
    int32 X
)

Public function

int32

 

Saturate

(
    int32 X
)

Public function

int32

 

ScalarParameter

(
    FName ParameterName,
    float DefaultValue
)

Public function

int32

 

SceneColor

(
    int32 Offset,
    int32 ViewportUV,
    bool bUseOffset
)

Public function

int32

 

SceneDepth

(
    int32 Offset,
    int32 ViewportUV,
    bool bUseOffset
)

Public function

int32

 

SceneTextureLookup

(
    int32 ViewportUV,
    uint32 SceneTextureId,
    bool bFiltered
)

Public function

void

 

SetBaseMaterialAttribute

(
    const FGuid& InAttributeID
)

Sets the bottom MaterialAttributes property of the stack.

Public function

void

 

SetMaterialProperty

(
    EMaterialProperty InProperty,
    EShaderFrequency OverrideShaderFreq...,
    bool bUsePreviousFrameTime
)

Sets internal state CurrentShaderFrequency

Public function

int32

 

ShadowReplace

(
    int32 Default,
    int32 Shadow
)

Public function

int32

 

Sign

(
    int32 X
)

Public function

int32

 

Sine

(
    int32 X
)

Public function

int32

 

Sobol

(
    int32 Cell,
    int32 Index,
    int32 Seed
)

Public function

int32

 

SpeedTree

(
    int32 GeometryArg,
    int32 WindArg,
    int32 LODArg,
    float BillboardThreshold,
    bool bAccurateWindVelocities,
    bool bExtraBend,
    int32 ExtraBendArg
)

Public function

int32

 

SphericalParticleOpacity

(
    int32 Density
)

Public function

int32

 

SquareRoot

(
    int32 X
)

Public function

int32

 

StaticBool

(
    bool Value
)

Public function

int32

 

StaticBoolParameter

(
    FName ParameterName,
    bool bDefaultValue
)

Public function

int32

 

StaticComponentMask

(
    int32 Vector,
    FName ParameterName,
    bool bDefaultR,
    bool bDefaultG,
    bool bDefaultB,
    bool bDefaultA
)

Public function

const FMater...

 

StaticMaterialLayersParameter

(
    FName ParameterName
)

Public function

int32

 

StaticTerrainLayerWeight

(
    FName ParameterName,
    int32 Default
)

Public function

int32

 

Sub

(
    int32 A,
    int32 B
)

Public function

int32

 

Tangent

(
    int32 X
)

Public function

int32

 

TemporalSobol

(
    int32 Index,
    int32 Seed
)

Public function

int32

 

Texture

(
    UTexture* Texture,
    int32& TextureReferenceIndex,
    EMaterialSamplerType SamplerType,
    ESamplerSourceMode SamplerSource,
    ETextureMipValueMode MipValueMode
)

Public function

int32

 

Texture

(
    UTexture* InTexture,
    EMaterialSamplerType SamplerType,
    ESamplerSourceMode SamplerSource
)

Public function

int32

 

TextureCoordinate

(
    uint32 CoordinateIndex,
    bool UnMirrorU,
    bool UnMirrorV
)

Public function

int32

 

TextureCoordinateOffset()

Public function

int32

 

TextureDecalDerivative

(
    bool bDDY
)

Public function

int32

 

TextureDecalMipmapLevel

(
    int32 TextureSizeInput
)

Public function

int32

 

TextureParameter

(
    FName ParameterName,
    UTexture* DefaultTexture,
    EMaterialSamplerType SamplerType,
    ESamplerSourceMode SamplerSource
)

Public function

int32

 

TextureParameter

(
    FName ParameterName,
    UTexture* DefaultTexture,
    int32& TextureReferenceIndex,
    EMaterialSamplerType SamplerType,
    ESamplerSourceMode SamplerSource
)

Public function

int32

 

TextureProperty

(
    int32 InTexture,
    EMaterialExposedTextureProperty Pro...
)

Public function

int32

 

TextureSample

(
    int32 Texture,
    int32 Coordinate,
    enum EMaterialSamplerType SamplerTy...,
    int32 MipValue0Index,
    int32 MipValue1Index,
    ETextureMipValueMode MipValueMode,
    ESamplerSourceMode SamplerSource,
    int32 TextureReferenceIndex,
    bool AutomaticViewMipBias
)

Public function

int32

 

TransformPosition

(
    EMaterialCommonBasis SourceCoordBas...,
    EMaterialCommonBasis DestCoordBasis,
    int32 A
)

Public function

int32

 

TransformVector

(
    EMaterialCommonBasis SourceCoordBas...,
    EMaterialCommonBasis DestCoordBasis,
    int32 A
)

Public function

int32

 

Truncate

(
    int32 X
)

Public function

int32

 

TwoSidedSign()

Public function

int32

 

ValidCast

(
    int32 Code,
    EMaterialValueType DestType
)

Casts the passed in code to DestType, or generates a compile error if the cast is not valid.

Public function

int32

 

VectorNoise

(
    int32 Position,
    int32 Quality,
    uint8 NoiseFunction,
    bool bTiling,
    uint32 RepeatSize
)

Public function

int32

 

VectorParameter

(
    FName ParameterName,
    const FLinearColor& DefaultValue
)

Public function

int32

 

VertexColor()

Public function

int32

 

VertexInterpolator

(
    uint32 InterpolatorIndex
)

Public function

int32

 

VertexNormal()

Public function

int32

 

ViewProperty

(
    EMaterialExposedViewProperty Proper...,
    bool InvProperty
)

Public function

int32

 

WorldPosition

(
    EWorldPositionIncludedOffsets World...
)

References

Module

Engine

Header

Runtime/Engine/Public/MaterialCompiler.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback