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

Structure for additional translation options. More...

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

Public Attributes

bool allowExtensions = false
 If true, the shader output may contain GLSL extensions, if the target shader version is too low.
 
bool autoBinding = false
 If true, binding slots for all buffer types will be generated sequentially, starting with index at 'autoBindingStartSlot'.
 
Int32 autoBindingStartSlot = 0
 Index to start generating binding slots from.
 
bool explicitBinding = false
 If true, explicit binding slots are enabled. By default, false.
 
bool obfuscate = false
 If true, code obfuscation is performed. By default, false.
 
bool optimize = false
 If true, little code optimizations are performed. By default, false.
 
bool preferWrappers = false
 If true, intrinsics are prefered to be implemented as wrappers (instead of inlining).
 
bool preprocessOnly = false
 If true, only the preprocessed source code will be written out. By default, false.
 
bool preserveComments = false
 If true, commentaries are preserved for each statement. By default, false.
 
bool rowMajorAlignment = false
 If true, matrices have row-major alignment.
 
bool separateSamplers = false
 If true, generated GLSL code will contain separate sampler and texture objects when supported.
 
bool separateShaders = false
 If true, generated GLSL code will support the 'ARB_separate_shader_objects' extension.
 
bool showAST = false
 If true, the AST (Abstract Syntax Tree) will be written to the log output.
 
bool showTimes = false
 If true, the timings of the different compilation processes are written to the log output.
 
bool unrollArrayInitializers = false
 If true, array initializations will be unrolled. By default, false.
 
bool validateOnly = false
 If true, the source code is only validated, but no output code will be generated.
 
bool writeGeneratorHeader = true
 If true, the generator header with metadata is written as first comment to the output.
 

Detailed Description

Structure for additional translation options.

Member Data Documentation

◆ allowExtensions

bool CeresEngine::ShaderCompiler::Options::allowExtensions = false

If true, the shader output may contain GLSL extensions, if the target shader version is too low.

By default, false.

◆ autoBinding

bool CeresEngine::ShaderCompiler::Options::autoBinding = false

If true, binding slots for all buffer types will be generated sequentially, starting with index at 'autoBindingStartSlot'.

By default, false.

Remarks
This will also enable 'explicitBinding'.

◆ autoBindingStartSlot

Int32 CeresEngine::ShaderCompiler::Options::autoBindingStartSlot = 0

Index to start generating binding slots from.

Only relevant if 'autoBinding' is enabled. By default, 0.

◆ explicitBinding

bool CeresEngine::ShaderCompiler::Options::explicitBinding = false

If true, explicit binding slots are enabled. By default, false.

◆ obfuscate

bool CeresEngine::ShaderCompiler::Options::obfuscate = false

If true, code obfuscation is performed. By default, false.

◆ optimize

bool CeresEngine::ShaderCompiler::Options::optimize = false

If true, little code optimizations are performed. By default, false.

◆ preferWrappers

bool CeresEngine::ShaderCompiler::Options::preferWrappers = false

If true, intrinsics are prefered to be implemented as wrappers (instead of inlining).

By default, false.

◆ preprocessOnly

bool CeresEngine::ShaderCompiler::Options::preprocessOnly = false

If true, only the preprocessed source code will be written out. By default, false.

◆ preserveComments

bool CeresEngine::ShaderCompiler::Options::preserveComments = false

If true, commentaries are preserved for each statement. By default, false.

◆ rowMajorAlignment

bool CeresEngine::ShaderCompiler::Options::rowMajorAlignment = false

If true, matrices have row-major alignment.

Otherwise the matrices have column-major alignment. By default, false.

◆ separateSamplers

bool CeresEngine::ShaderCompiler::Options::separateSamplers = false

If true, generated GLSL code will contain separate sampler and texture objects when supported.

By default, true.

◆ separateShaders

bool CeresEngine::ShaderCompiler::Options::separateShaders = false

If true, generated GLSL code will support the 'ARB_separate_shader_objects' extension.

By default, false.

◆ showAST

bool CeresEngine::ShaderCompiler::Options::showAST = false

If true, the AST (Abstract Syntax Tree) will be written to the log output.

By default, false.

◆ showTimes

bool CeresEngine::ShaderCompiler::Options::showTimes = false

If true, the timings of the different compilation processes are written to the log output.

By default, false.

◆ unrollArrayInitializers

bool CeresEngine::ShaderCompiler::Options::unrollArrayInitializers = false

If true, array initializations will be unrolled. By default, false.

◆ validateOnly

bool CeresEngine::ShaderCompiler::Options::validateOnly = false

If true, the source code is only validated, but no output code will be generated.

By default, false.

◆ writeGeneratorHeader

bool CeresEngine::ShaderCompiler::Options::writeGeneratorHeader = true

If true, the generator header with metadata is written as first comment to the output.

By default, true.


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