Developer Documentation
ACG::ShaderModifierFile Class Reference
Inheritance diagram for ACG::ShaderModifierFile:
ACG::ShaderModifier

Public Member Functions

void modifyVertexIO (ShaderGenerator *_shader) override
 Add your own inputs/outputs to the vertex shader. More...
 
void modifyTessControlIO (ShaderGenerator *_shader) override
 Add your own inputs/outputs to the tessellation control shader. More...
 
void modifyTessEvalIO (ShaderGenerator *_shader) override
 Add your own inputs/outputs to the tessellation evaluation shader. More...
 
void modifyGeometryIO (ShaderGenerator *_shader) override
 Add your own inputs/outputs to the geometry shader. More...
 
void modifyFragmentIO (ShaderGenerator *_shader) override
 Add your own inputs/outputs to the fragment shader. More...
 
void modifyVertexBeginCode (QStringList *_code) override
 Append code the the vertex shader. More...
 
void modifyVertexEndCode (QStringList *_code) override
 Append code the the vertex shader. More...
 
void modifyFragmentBeginCode (QStringList *_code) override
 Append code the the fragment shader. More...
 
void modifyFragmentEndCode (QStringList *_code) override
 Append code the the fragment shader. More...
 
const QString & filename () const
 
const QDateTime & filetime () const
 
void filetime (const QDateTime &_newtime)
 
void clear ()
 
- Public Member Functions inherited from ACG::ShaderModifier
virtual void modifyLightingCode (QStringList *_code, int _lightId, ShaderGenLightType _lightType)
 Modify the default lighting code of the shader generator. More...
 
virtual bool replaceDefaultLightingCode ()
 Specify whether this modifier replaces or extends the default lighting code. More...
 
unsigned int getID ()
 Returns the modifier ID. More...
 
 operator std::vector< unsigned int > () const
 
std::vector< unsigned int > operator| (const std::vector< unsigned int > &_v) const
 

Static Public Member Functions

static ShaderModifierFileloadFromFile (QString _filename)
 
- Static Public Member Functions inherited from ACG::ShaderModifier
static ShaderModifierloadFromFile (QString _filename)
 Load a modifier from file. More...
 

Private Member Functions

void loadBlocks (const QStringList &_lines)
 
void modifyIO (int _stage, ShaderGenerator *_shader)
 

Private Attributes

QString filename_
 
QDateTime filetime_
 
int version_
 
QStringList io_ [5]
 
QStringList vertexBeginCode_
 
QStringList vertexEndCode_
 
QStringList fragmentBeginCode_
 
QStringList fragmentEndCode_
 

Static Private Attributes

static QHash< QString, ShaderModifierFilefileCache_
 

Detailed Description

Definition at line 2518 of file ShaderGenerator.cc.

Member Function Documentation

◆ modifyFragmentBeginCode()

void ACG::ShaderModifierFile::modifyFragmentBeginCode ( QStringList *  _code)
inlineoverridevirtual

Append code the the fragment shader.

Refer to the generation structure (Shader Generator ) to see where your code is added and which variables you can modify. Use

_code->push_back("...");

to insert your code here

Parameters
_codestring list of shader code.

Reimplemented from ACG::ShaderModifier.

Definition at line 2538 of file ShaderGenerator.cc.

◆ modifyFragmentEndCode()

void ACG::ShaderModifierFile::modifyFragmentEndCode ( QStringList *  _code)
inlineoverridevirtual

Append code the the fragment shader.

Refer to the generation structure (Shader Generator ) to see where your code is added and which variables you can modify. Use

_code->push_back("...");

to insert your code here.

Parameters
_codestring list of shader code.

Reimplemented from ACG::ShaderModifier.

Definition at line 2539 of file ShaderGenerator.cc.

◆ modifyFragmentIO()

void ACG::ShaderModifierFile::modifyFragmentIO ( ShaderGenerator _shader)
inlineoverridevirtual

Add your own inputs/outputs to the fragment shader.

your implementation may look like this:

_shader->addInput("sampler2D depthSampler");
_shader->addUniform("vec4 shaderParam");
Parameters
_shadershader interface

Reimplemented from ACG::ShaderModifier.

Definition at line 2533 of file ShaderGenerator.cc.

◆ modifyGeometryIO()

void ACG::ShaderModifierFile::modifyGeometryIO ( ShaderGenerator _shader)
inlineoverridevirtual

Add your own inputs/outputs to the geometry shader.

your implementation may look like this:

_shader->addInput("sampler2D depthSampler");
_shader->addUniform("vec4 shaderParam");
Parameters
_shadershader interface

Reimplemented from ACG::ShaderModifier.

Definition at line 2532 of file ShaderGenerator.cc.

◆ modifyTessControlIO()

void ACG::ShaderModifierFile::modifyTessControlIO ( ShaderGenerator _shader)
inlineoverridevirtual

Add your own inputs/outputs to the tessellation control shader.

your implementation may look like this:

_shader->addInput("sampler2D depthSampler");
_shader->addUniform("vec4 shaderParam");
Parameters
_shadershader interface

Reimplemented from ACG::ShaderModifier.

Definition at line 2530 of file ShaderGenerator.cc.

◆ modifyTessEvalIO()

void ACG::ShaderModifierFile::modifyTessEvalIO ( ShaderGenerator _shader)
inlineoverridevirtual

Add your own inputs/outputs to the tessellation evaluation shader.

your implementation may look like this:

_shader->addInput("sampler2D depthSampler");
_shader->addUniform("vec4 shaderParam");
Parameters
_shadershader interface

Reimplemented from ACG::ShaderModifier.

Definition at line 2531 of file ShaderGenerator.cc.

◆ modifyVertexBeginCode()

void ACG::ShaderModifierFile::modifyVertexBeginCode ( QStringList *  _code)
inlineoverridevirtual

Append code the the vertex shader.

Refer to the generation structure (Shader Generator ) to see where your code is added and which variables you can modify. Use

_code->push_back("...");

to insert your code here.

Parameters
_codestring list of shader code.

Reimplemented from ACG::ShaderModifier.

Definition at line 2536 of file ShaderGenerator.cc.

◆ modifyVertexEndCode()

void ACG::ShaderModifierFile::modifyVertexEndCode ( QStringList *  _code)
inlineoverridevirtual

Append code the the vertex shader.

Refer to the generation structure (Shader Generator ) to see where your code is added and which variables you can modify. Use

_code->push_back("...");

to insert your code here

Parameters
_codestring list of shader code.

Reimplemented from ACG::ShaderModifier.

Definition at line 2537 of file ShaderGenerator.cc.

◆ modifyVertexIO()

void ACG::ShaderModifierFile::modifyVertexIO ( ShaderGenerator _shader)
inlineoverridevirtual

Add your own inputs/outputs to the vertex shader.

Your implementation may look like this:

_shader->addInput("vec4 inTangent");
_shader->addUniform("vec4 shaderParam");
Parameters
_shadershader interface

Reimplemented from ACG::ShaderModifier.

Definition at line 2529 of file ShaderGenerator.cc.


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