FVertexFactory

Encapsulates a vertex data source which can be linked into a vertex shader.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

RenderCore

Header

/Engine/Source/Runtime/RenderCore/Public/VertexFactory.h

Include

#include "VertexFactory.h"

Syntax

class FVertexFactory : public FRenderResource

Remarks

Encapsulates a vertex data source which can be linked into a vertex shader.

Variables

Name Description

Protected variable

bool

 

bNeedsDeclaration

VF can explicitly set this to false to avoid errors without decls; this is for VFs that fetch from buffers directly (e.g. Niagara)

Protected variable

bool

 

bSupportsManualVertexFetch

Protected variable

int8[3]

 

PrimitiveIdStreamIndex

Protected variable

TArray< FVertex...

 

Streams

The vertex streams used to render the factory.

Constructors

Name Description

Public function

FVertexFactory

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Functions

Name Description

Protected function

FVertexEleme...

 

AccessStreamComponent

(
    const FVertexStreamComponent& Comp...,
    uint8 AttributeIndex,
    EVertexInputStreamType InputStreamT...
)

Creates a vertex element for a vertex stream component.

Protected function

FVertexEleme...

 

AccessStreamComponent

(
    const FVertexStreamComponent& Comp...,
    uint8 AttributeIndex
)

Creates a vertex element for a vertex stream components.

Public function

FVertexDecla...

 

GetDeclaration()

Accessors.

Public function Const

const FVerte...

 

GetDeclaration

(
    EVertexInputStreamType InputStreamT...
)

Public function Const

int32

 

GetPrimitiveIdStreamIndex

(
    EVertexInputStreamType InputStreamT...
)

Public function Const

void

 

GetStreams

(
    ERHIFeatureLevel::Type InFeatureLev...,
    EVertexInputStreamType VertexStream...,
    FVertexInputStreamArray& OutVertex...
)

Public function Virtual Const

FVertexFacto...

 

GetType()

Protected function

void

 

InitDeclaration

(
    const FVertexDeclarationElementList...,
    EVertexInputStreamType StreamType
)

Initializes the vertex declaration.

Public function Virtual Const

bool

 

IsGPUSkinned()

Public function Static

void

 

ModifyCompilationEnvironment

(
    const FVertexFactoryShaderPermutati...,
    FShaderCompilerEnvironment& OutEnv...
)

Can be overridden by FVertexFactory subclasses to modify their compile environment just before compilation occurs.

Public function Const

bool

 

NeedsDeclaration()

Public function Const

void

 

OffsetInstanceStreams

(
    uint32 InstanceOffset,
    EVertexInputStreamType VertexStream...,
    FVertexInputStreamArray& VertexStr...
)

Public function Virtual Const

bool

 

RendersPrimitivesAsCameraFacingSprites()

Public function

void

 

SetDeclaration

(
    FVertexDeclarationRHIRef& NewDecla...
)

Protected function

void

 

SetPrimitiveIdStreamIndex

(
    EVertexInputStreamType InputStreamT...,
    int32 StreamIndex
)

Public function Const

bool

 

SupportsManualVertexFetch

(
    const FStaticFeatureLevel InFeature...
)

Public function Virtual Const

bool

 

SupportsNullPixelShader()

Indicates whether the vertex factory supports a null pixel shader.

Public function Virtual Const

bool

 

SupportsPositionAndNormalOnlyStream()

Indicates whether the vertex factory supports a position-and-normal-only stream.

Public function Virtual Const

bool

 

SupportsPositionOnlyStream()

Indicates whether the vertex factory supports a position-only stream.

Public function Static

bool

 

SupportsTessellationShaders()

Can be overridden by FVertexFactory subclasses to enable HS/DS in D3D11

Public function Static

void

 

ValidateCompiledResult

(
    const FVertexFactoryType* Type,
    EShaderPlatform Platform,
    const FShaderParameterMap& Paramet...,
    TArray< FString >& OutErrors
)

Can be overridden by FVertexFactory subclasses to fail a compile based on compilation output.

Overridden from FRenderResource

Name Description

Public function Virtual

void

 

ReleaseRHI()

Releases the RHI resources used by this resource.

Classes

Name

Description

Protected struct

FVertexStream

Information needed to set a vertex stream.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss