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 Virtual Const

uint64

 

GetStaticBatchElementVisibility

(
    const FSceneView& View,
    const FMeshBatch* Batch,
    const void* InViewCustomData
)

Get a bitmask representing the visibility of each FMeshBatch element.

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 FVertexFactoryType* Type,
    EShaderPlatform Platform,
    const FMaterial* Material,
    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...
)

Public function Const

bool

 

SupportsManualVertexFetch

(
    ERHIFeatureLevel::Type InFeatureLev...
)

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.

Select Skin
Light
Dark

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