\hypertarget{a11168}{}\section{Cel\+Shading\+Modifier Class Reference}
\label{a11168}\index{Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}}
Inheritance diagram for Cel\+Shading\+Modifier\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a11168}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{a11168_afeb08b63efc70cff2fd31da965956d5e}{modify\+Vertex\+IO} (\hyperlink{a07568}{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{a11168_aa22486aa3db6eed67b581729ae55b798}{modify\+Fragment\+IO} (\hyperlink{a07568}{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{a11168_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{a11168_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{a11168_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 
\mbox{\Hypertarget{a11168_a9a5166c0bb1d74cbbcd7aa4061ed1ad5}\label{a11168_a9a5166c0bb1d74cbbcd7aa4061ed1ad5}} 
static \hyperlink{a11168}{Cel\+Shading\+Modifier} {\bfseries instance}
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}


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



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a11168_a81ad6e4358ff91486456dd2b687bf1c3}\label{a11168_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{\texorpdfstring{modify\+Fragment\+End\+Code()}{modifyFragmentEndCode()}}
{\footnotesize\ttfamily 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]}}



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{a07580_a25b1e0be6dd4a8365ecb1c72da21d310}{A\+C\+G\+::\+Shader\+Modifier}.



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

\mbox{\Hypertarget{a11168_aa22486aa3db6eed67b581729ae55b798}\label{a11168_aa22486aa3db6eed67b581729ae55b798}} 
\index{Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}!modify\+Fragment\+IO@{modify\+Fragment\+IO}}
\index{modify\+Fragment\+IO@{modify\+Fragment\+IO}!Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}}
\subsubsection{\texorpdfstring{modify\+Fragment\+I\+O()}{modifyFragmentIO()}}
{\footnotesize\ttfamily void Cel\+Shading\+Modifier\+::modify\+Fragment\+IO (\begin{DoxyParamCaption}\item[{\hyperlink{a07568}{A\+C\+G\+::\+Shader\+Generator} $\ast$}]{\+\_\+shader }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



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{a07580_ae720c7104306f1e696e690760b928048}{A\+C\+G\+::\+Shader\+Modifier}.



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

\mbox{\Hypertarget{a11168_a55899bf3273f452cc4150666aba57c62}\label{a11168_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{\texorpdfstring{modify\+Lighting\+Code()}{modifyLightingCode()}}
{\footnotesize\ttfamily 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]}}



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{a07580_a0d9329675647a8d2d7c9ebd66370a30b}{A\+C\+G\+::\+Shader\+Modifier}.



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

\mbox{\Hypertarget{a11168_afeb08b63efc70cff2fd31da965956d5e}\label{a11168_afeb08b63efc70cff2fd31da965956d5e}} 
\index{Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}!modify\+Vertex\+IO@{modify\+Vertex\+IO}}
\index{modify\+Vertex\+IO@{modify\+Vertex\+IO}!Cel\+Shading\+Modifier@{Cel\+Shading\+Modifier}}
\subsubsection{\texorpdfstring{modify\+Vertex\+I\+O()}{modifyVertexIO()}}
{\footnotesize\ttfamily void Cel\+Shading\+Modifier\+::modify\+Vertex\+IO (\begin{DoxyParamCaption}\item[{\hyperlink{a07568}{A\+C\+G\+::\+Shader\+Generator} $\ast$}]{\+\_\+shader }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



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{a07580_a0692498de2b752b70b8ac3afcbfb5212}{A\+C\+G\+::\+Shader\+Modifier}.



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

\mbox{\Hypertarget{a11168_a7ab6159c2138c3da3e143e85acb67110}\label{a11168_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{\texorpdfstring{replace\+Default\+Lighting\+Code()}{replaceDefaultLightingCode()}}
{\footnotesize\ttfamily bool Cel\+Shading\+Modifier\+::replace\+Default\+Lighting\+Code (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



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{a07580_a62cbca887ccde2f2953b8253886d47ee}{A\+C\+G\+::\+Shader\+Modifier}.



Definition at line 92 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}
