BrainTrain
 All Classes Namespaces Files Functions Variables Macros Pages
brtr::CelShading Class Reference

CelSading Effect, every child of this node will get the effect. More...

#include <CelShading.h>

Inheritance diagram for brtr::CelShading:

Public Member Functions

 CelShading (bool secondPass=true, std::string vertSource="celShader.vert")
 Constructor. More...
 
 CelShading (const CelShading &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
 META_Effect (null, CelShading,"CelShading","This effect implements a technique called 'Cel-Shading' to produce a ""cartoon-style (non photorealistic) rendering. Two passes are required: ""the first one draws solid surfaces, the second one draws the outlines. ""Vertices Shader, Toon Texture pass can be customize upon creating.","Marco Jez; OGLSL port by Mike Weiblen, adaptions by Gleb Ostrowski ")
 

Protected Member Functions

virtual ~CelShading ()
 
bool define_techniques ()
 

Private Attributes

osg::ref_ptr< osg::Material > _material
 
osg::ref_ptr< osg::LineWidth > _lineWidth
 
bool _secondPass
 
std::string _vertSource
 

Detailed Description

CelSading Effect, every child of this node will get the effect.

This effect implements a technique called 'Cel-Shading' to produce a cartoon-style (non photorealistic) rendering.
Two passes are required:
the first one draws solid surfaces, the second one draws the outlines.

Author
Gleb Ostrowski
Version
1.0
Date
2014
Precondition
In Texture Layer 1 (stateset) must be the ToonTexture set

Definition at line 18 of file CelShading.h.

Constructor & Destructor Documentation

brtr::CelShading::CelShading ( bool  secondPass = true,
std::string  vertSource = "celShader.vert" 
)

Constructor.

Parameters
secondPassif false, no outlines are being drawn
vertSourceone can set explicitly the vertex shader

Definition at line 97 of file CelShading.cpp.

brtr::CelShading::CelShading ( const CelShading copy,
const osg::CopyOp &  copyop = osg::CopyOp::SHALLOW_COPY 
)

Definition at line 104 of file CelShading.cpp.

virtual brtr::CelShading::~CelShading ( )
inlineprotectedvirtual

Definition at line 43 of file CelShading.h.

Member Function Documentation

bool brtr::CelShading::define_techniques ( )
protected

Definition at line 110 of file CelShading.cpp.

brtr::CelShading::META_Effect ( null  ,
CelShading  ,
"CelShading"  ,
"This effect implements a technique called 'Cel-Shading' to produce a ""cartoon-style (non photorealistic) rendering. Two passes are required: ""the first one draws solid  surfaces,
the second one draws the outlines.""Vertices  Shader,
Toon Texture pass can be customize upon creating."  ,
"Marco Jez; OGLSL port by Mike  Weiblen,
adaptions by Gleb Ostrowski"   
)

Member Data Documentation

osg::ref_ptr<osg::LineWidth> brtr::CelShading::_lineWidth
private

Definition at line 49 of file CelShading.h.

osg::ref_ptr<osg::Material> brtr::CelShading::_material
private

Definition at line 48 of file CelShading.h.

bool brtr::CelShading::_secondPass
private

Definition at line 50 of file CelShading.h.

std::string brtr::CelShading::_vertSource
private

Definition at line 51 of file CelShading.h.


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