CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShaderCompiler::NameMangling Struct Reference

Name mangling descriptor structure for shader input/output variables (also referred to as "varyings"), temporary variables, and reserved keywords. More...

#include <CeresEngine/Material/ShaderCompiler/ShaderCompiler.hpp>

Public Attributes

String inputPrefix = "xsv_"
 Name mangling prefix for shader input variables.
 
String outputPrefix = "xsv_"
 Name mangling prefix for shader output variables.
 
String reservedWordPrefix = "xsr_"
 Name mangling prefix for reserved words (such as "texture", "main", "sin" etc.).
 
String temporaryPrefix = "xst_"
 Name mangling prefix for temporary variables.
 
String namespacePrefix = "xsn_"
 Name mangling prefix for namespaces like structures or classes.
 
bool useAlwaysSemantics = false
 If true, shader input/output variables are always renamed to their semantics, even for vertex input and fragment output.
 
bool renameBufferFields = false
 If true, the data fields of a 'buffer'-objects is renamed rather than the outer identifier.
 

Detailed Description

Name mangling descriptor structure for shader input/output variables (also referred to as "varyings"), temporary variables, and reserved keywords.

See also
ShaderOutput::nameMangling

Member Data Documentation

◆ inputPrefix

String CeresEngine::ShaderCompiler::NameMangling::inputPrefix = "xsv_"

Name mangling prefix for shader input variables.

By default, "xsv_".

Remarks
This can also be empty or equal to "outputPrefix".

◆ namespacePrefix

String CeresEngine::ShaderCompiler::NameMangling::namespacePrefix = "xsn_"

Name mangling prefix for namespaces like structures or classes.

By default, "xsn_".

Remarks
This can also be empty, but if it's not empty it must not be equal to any of the other prefixes.

◆ outputPrefix

String CeresEngine::ShaderCompiler::NameMangling::outputPrefix = "xsv_"

Name mangling prefix for shader output variables.

By default, "xsv_".

Remarks
This can also be empty or equal to "inputPrefix".

◆ renameBufferFields

bool CeresEngine::ShaderCompiler::NameMangling::renameBufferFields = false

If true, the data fields of a 'buffer'-objects is renamed rather than the outer identifier.

By default, false.

Remarks
This can be useful for external diagnostic tools, to access the original identifier.

◆ reservedWordPrefix

String CeresEngine::ShaderCompiler::NameMangling::reservedWordPrefix = "xsr_"

Name mangling prefix for reserved words (such as "texture", "main", "sin" etc.).

By default, "xsr_".

Remarks
This must not be equal to any of the other prefixes and it must not be empty.

◆ temporaryPrefix

String CeresEngine::ShaderCompiler::NameMangling::temporaryPrefix = "xst_"

Name mangling prefix for temporary variables.

By default, "xst_".

Remarks
This must not be equal to any of the other prefixes and it must not be empty.

◆ useAlwaysSemantics

bool CeresEngine::ShaderCompiler::NameMangling::useAlwaysSemantics = false

If true, shader input/output variables are always renamed to their semantics, even for vertex input and fragment output.

Otherwise, their original identifiers are used. By default, false.


The documentation for this struct was generated from the following file: