\hypertarget{a00400}{\section{Cel\+Shading\+Modifier Class Reference}
\label{a00400}\index{Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}}
}
Inheritance diagram for Cel\+Shading\+Modifier\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a00400}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{a00400_afeb08b63efc70cff2fd31da965956d5e}{modify\+Vertex\+I\+O} (\hyperlink{a01160}{A\+C\+G\+::\+Shader\+Generator} $\ast$\+\_\+shader)
\begin{DoxyCompactList}\small\item\em Add your own inputs/outputs to the vertex shader. \end{DoxyCompactList}\item 
void \hyperlink{a00400_aa22486aa3db6eed67b581729ae55b798}{modify\+Fragment\+I\+O} (\hyperlink{a01160}{A\+C\+G\+::\+Shader\+Generator} $\ast$\+\_\+shader)
\begin{DoxyCompactList}\small\item\em Add your own inputs/outputs to the fragment shader. \end{DoxyCompactList}\item 
void \hyperlink{a00400_a81ad6e4358ff91486456dd2b687bf1c3}{modify\+Fragment\+End\+Code} (Q\+String\+List $\ast$\+\_\+code)
\begin{DoxyCompactList}\small\item\em Append code the the fragment shader. \end{DoxyCompactList}\item 
bool \hyperlink{a00400_a7ab6159c2138c3da3e143e85acb67110}{replace\+Default\+Lighting\+Code} ()
\begin{DoxyCompactList}\small\item\em Specify whether this modifier replaces or extends the default lighting code. \end{DoxyCompactList}\item 
void \hyperlink{a00400_a55899bf3273f452cc4150666aba57c62}{modify\+Lighting\+Code} (Q\+String\+List $\ast$\+\_\+code, int \+\_\+light\+Id, A\+C\+G\+::\+Shader\+Gen\+Light\+Type \+\_\+light\+Type)
\begin{DoxyCompactList}\small\item\em Modify the default lighting code of the shader generator. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00400_a9a5166c0bb1d74cbbcd7aa4061ed1ad5}{static \hyperlink{a00400}{Cel\+Shading\+Modifier} {\bfseries instance}}\label{a00400_a9a5166c0bb1d74cbbcd7aa4061ed1ad5}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}


Definition at line 65 of file Toon\+Renderer.\+cc.



\subsection{Member Function Documentation}
\hypertarget{a00400_a81ad6e4358ff91486456dd2b687bf1c3}{\index{Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}!modify\+Fragment\+End\+Code@{modify\+Fragment\+End\+Code}}
\index{modify\+Fragment\+End\+Code@{modify\+Fragment\+End\+Code}!Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}}
\subsubsection[{modify\+Fragment\+End\+Code}]{\setlength{\rightskip}{0pt plus 5cm}void Cel\+Shading\+Modifier\+::modify\+Fragment\+End\+Code (
\begin{DoxyParamCaption}
\item[{Q\+String\+List $\ast$}]{\+\_\+code}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00400_a81ad6e4358ff91486456dd2b687bf1c3}


Append code the the fragment shader. 

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


\begin{DoxyCode}
\_code->push\_back(\textcolor{stringliteral}{"..."});
\end{DoxyCode}


to insert your code here.


\begin{DoxyParams}{Parameters}
{\em \+\_\+code} & string list of shader code. \\
\hline
\end{DoxyParams}


Reimplemented from \hyperlink{a01163_a25b1e0be6dd4a8365ecb1c72da21d310}{A\+C\+G\+::\+Shader\+Modifier}.



Definition at line 94 of file Toon\+Renderer.\+cc.

\hypertarget{a00400_aa22486aa3db6eed67b581729ae55b798}{\index{Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}!modify\+Fragment\+I\+O@{modify\+Fragment\+I\+O}}
\index{modify\+Fragment\+I\+O@{modify\+Fragment\+I\+O}!Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}}
\subsubsection[{modify\+Fragment\+I\+O}]{\setlength{\rightskip}{0pt plus 5cm}void Cel\+Shading\+Modifier\+::modify\+Fragment\+I\+O (
\begin{DoxyParamCaption}
\item[{{\bf A\+C\+G\+::\+Shader\+Generator} $\ast$}]{\+\_\+shader}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00400_aa22486aa3db6eed67b581729ae55b798}


Add your own inputs/outputs to the fragment shader. 

your implementation may look like this\+:


\begin{DoxyCode}
\_shader->addInput(\textcolor{stringliteral}{"sampler2D depthSampler"});
\_shader->addUniform(\textcolor{stringliteral}{"vec4 shaderParam"});
\end{DoxyCode}



\begin{DoxyParams}{Parameters}
{\em \+\_\+shader} & shader interface \\
\hline
\end{DoxyParams}


Reimplemented from \hyperlink{a01163_ae720c7104306f1e696e690760b928048}{A\+C\+G\+::\+Shader\+Modifier}.



Definition at line 77 of file Toon\+Renderer.\+cc.

\hypertarget{a00400_a55899bf3273f452cc4150666aba57c62}{\index{Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}!modify\+Lighting\+Code@{modify\+Lighting\+Code}}
\index{modify\+Lighting\+Code@{modify\+Lighting\+Code}!Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}}
\subsubsection[{modify\+Lighting\+Code}]{\setlength{\rightskip}{0pt plus 5cm}void Cel\+Shading\+Modifier\+::modify\+Lighting\+Code (
\begin{DoxyParamCaption}
\item[{Q\+String\+List $\ast$}]{\+\_\+code, }
\item[{int}]{\+\_\+light\+Id, }
\item[{A\+C\+G\+::\+Shader\+Gen\+Light\+Type}]{\+\_\+light\+Type}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00400_a55899bf3273f452cc4150666aba57c62}


Modify the default lighting code of the shader generator. 

Refer to the generation structure (\hyperlink{ShaderGenerator_page}{Shader Generator} ) to see where your code is added and which variables you can modify.

Use


\begin{DoxyCode}
\_code->push\_back(\textcolor{stringliteral}{"..."});
\end{DoxyCode}


to insert your code here.


\begin{DoxyParams}{Parameters}
{\em \+\_\+code} & string list of shader code. \\
\hline
{\em \+\_\+light\+Id} & light index, use g\+\_\+v\+Light\+Dir\+\_\+\+\_\+\{\+\_\+light\+Id\}, etc. in shader code to use light parameters \\
\hline
{\em \+\_\+light\+Type} & light type\+: point, spot or directional light \\
\hline
\end{DoxyParams}


Reimplemented from \hyperlink{a01163_a0d9329675647a8d2d7c9ebd66370a30b}{A\+C\+G\+::\+Shader\+Modifier}.



Definition at line 101 of file Toon\+Renderer.\+cc.

\hypertarget{a00400_afeb08b63efc70cff2fd31da965956d5e}{\index{Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}!modify\+Vertex\+I\+O@{modify\+Vertex\+I\+O}}
\index{modify\+Vertex\+I\+O@{modify\+Vertex\+I\+O}!Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}}
\subsubsection[{modify\+Vertex\+I\+O}]{\setlength{\rightskip}{0pt plus 5cm}void Cel\+Shading\+Modifier\+::modify\+Vertex\+I\+O (
\begin{DoxyParamCaption}
\item[{{\bf A\+C\+G\+::\+Shader\+Generator} $\ast$}]{\+\_\+shader}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00400_afeb08b63efc70cff2fd31da965956d5e}


Add your own inputs/outputs to the vertex shader. 

Your implementation may look like this\+:


\begin{DoxyCode}
\_shader->addInput(\textcolor{stringliteral}{"vec4 inTangent"});
\_shader->addUniform(\textcolor{stringliteral}{"vec4 shaderParam"});
\end{DoxyCode}



\begin{DoxyParams}{Parameters}
{\em \+\_\+shader} & shader interface \\
\hline
\end{DoxyParams}


Reimplemented from \hyperlink{a01163_a0692498de2b752b70b8ac3afcbfb5212}{A\+C\+G\+::\+Shader\+Modifier}.



Definition at line 68 of file Toon\+Renderer.\+cc.

\hypertarget{a00400_a7ab6159c2138c3da3e143e85acb67110}{\index{Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}!replace\+Default\+Lighting\+Code@{replace\+Default\+Lighting\+Code}}
\index{replace\+Default\+Lighting\+Code@{replace\+Default\+Lighting\+Code}!Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}}
\subsubsection[{replace\+Default\+Lighting\+Code}]{\setlength{\rightskip}{0pt plus 5cm}bool Cel\+Shading\+Modifier\+::replace\+Default\+Lighting\+Code (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{a00400_a7ab6159c2138c3da3e143e85acb67110}


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

\begin{DoxyReturn}{Returns}
return false if this modifier modifies an already computed lighting color, return true if this modifier replaces the default lighting color 
\end{DoxyReturn}


Reimplemented from \hyperlink{a01163_a62cbca887ccde2f2953b8253886d47ee}{A\+C\+G\+::\+Shader\+Modifier}.



Definition at line 99 of file Toon\+Renderer.\+cc.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Plugin\+Collection-\/\+Renderers/\+Plugin-\/\+Render-\/\+Toon/Toon\+Renderer.\+cc\end{DoxyCompactItemize}
