FShaderValueType

Choose your operating system:

Windows

macOS

Linux

References

Module

ComputeFramework

Header

/Engine/Plugins/Experimental/ComputeFramework/Source/ComputeFramework/Public/ComputeFramework/ShaderParamTypeDefinition.h

Include

#include "ComputeFramework/ShaderParamTypeDefinition.h"

Syntax

USTRUCT()
struct FShaderValueType

Variables

Name Description

Public variable

union FShaderVa...

 

@10325

Public variable UProperty

EShaderFundamen...

 

DimensionType

Public variable

uint8

 

MatrixColumnCount

Public variable

uint8

 

MatrixRowCount

Public variable UProperty

FName

 

Name

Public variable

TArray< FStruct...

 

StructElements

Public variable UProperty

EShaderFundamen...

 

Type

Public variable

uint8

 

VectorElemCount

Functions

Name Description

Public function Static

FShaderValue...

 

FromString

(
    const FString& InTypeDecl
)

Parses the given string section and tries to convert to a shader value type.

Public function Static

FShaderValue...

 

Get

(
    EShaderFundamentalType InType
)

Returns a scalar value type.

Public function Static

FShaderValue...

 

Get

(
    EShaderFundamentalType InType,
    int32 InElemCount
)

Returns a vector value type.

Public function Static

FShaderValue...

 

Get

(
    FName InName,
    std::initializer_list< FStructEleme...
)

Constructor for struct types

Public function Static

FShaderValue...

 

Get

(
    EShaderFundamentalType InType,
    int32 InRowCount,
    int32 InColumnCount
)

Constructor for vector values. InElemCount can be any value between 1-4

Public function Const

int32

 

GetResourceElementSize()

Returns the size in bytes required to hold one element of this type using HLSL sizing (which may be different from packed sizing in C++).

Public function Const

FString

 

GetTypeDeclaration()

Returns the type declaration if this type is a struct, or the empty string if not.

Public function Const

FString

 

GetZeroValueAsString()

Returns a zero value for the type as a string, suitable for use as a constant in HLSL code.

Public function Const

FString

 

ToString()

Returns the type name as a string (e.g. 'vector2', 'matrix2x3' or 'struct_name') for use in variable declarations.

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FShaderValueType& InOtherTyp...
)

Returns true if this type and the other type are not equal.

Public function Const

bool

 

operator==

(
    const FShaderValueType& InOtherTyp...
)

Returns true if this type and the other type are exactly equal.

Classes

Name

Description

Public struct

FStructElement

A simple container representing a single, named element in a shader value struct.