Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CelShadingModifier Class Reference
Inheritance diagram for CelShadingModifier:
ACG::ShaderModifier

Public Member Functions

void modifyVertexIO (ACG::ShaderGenerator *_shader)
 Add your own inputs/outputs to the vertex shader. More...
 
void modifyFragmentIO (ACG::ShaderGenerator *_shader)
 Add your own inputs/outputs to the fragment shader. More...
 
void modifyFragmentEndCode (QStringList *_code)
 Append code the the fragment shader. More...
 
bool replaceDefaultLightingCode ()
 Specify whether this modifier replaces or extends the default lighting code. More...
 
void modifyLightingCode (QStringList *_code, int _lightId, ACG::ShaderGenLightType _lightType)
 Modify the default lighting code of the shader generator. More...
 
- Public Member Functions inherited from ACG::ShaderModifier
virtual void modifyVertexBeginCode (QStringList *_code)
 Append code the the vertex shader. More...
 
virtual void modifyVertexEndCode (QStringList *_code)
 Append code the the vertex shader. More...
 
virtual void modifyGeometryIO (ShaderGenerator *_shader)
 Add your own inputs/outputs to the geometry shader. More...
 
virtual void modifyTessControlIO (ShaderGenerator *_shader)
 Add your own inputs/outputs to the tessellation control shader. More...
 
virtual void modifyTessEvalIO (ShaderGenerator *_shader)
 Add your own inputs/outputs to the tessellation evaluation shader. More...
 
virtual void modifyFragmentBeginCode (QStringList *_code)
 Append code the the fragment shader. 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 Attributes

static CelShadingModifier instance
 

Additional Inherited Members

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

Detailed Description

Definition at line 65 of file ToonRenderer.cc.

Member Function Documentation

void CelShadingModifier::modifyFragmentEndCode ( QStringList *  _code)
inlinevirtual

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 94 of file ToonRenderer.cc.

void CelShadingModifier::modifyFragmentIO ( ACG::ShaderGenerator _shader)
inlinevirtual

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 77 of file ToonRenderer.cc.

void CelShadingModifier::modifyLightingCode ( QStringList *  _code,
int  _lightId,
ACG::ShaderGenLightType  _lightType 
)
inlinevirtual

Modify the default lighting code of the shader generator.

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.
_lightIdlight index, use g_vLightDir__{_lightId}, etc. in shader code to use light parameters
_lightTypelight type: point, spot or directional light

Reimplemented from ACG::ShaderModifier.

Definition at line 101 of file ToonRenderer.cc.

void CelShadingModifier::modifyVertexIO ( ACG::ShaderGenerator _shader)
inlinevirtual

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 68 of file ToonRenderer.cc.

bool CelShadingModifier::replaceDefaultLightingCode ( )
inlinevirtual

Specify whether this modifier replaces or extends the default lighting code.

Returns
return false if this modifier modifies an already computed lighting color, return true if this modifier replaces the default lighting color

Reimplemented from ACG::ShaderModifier.

Definition at line 99 of file ToonRenderer.cc.


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