\hypertarget{a07580}{}\section{A\+CG\+:\+:Shader\+Modifier Class Reference}
\label{a07580}\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}


{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/\+Shader\+Generator.\+hh$>$}

Inheritance diagram for A\+CG\+:\+:Shader\+Modifier\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=8.092485cm]{a07580}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a07580_a0692498de2b752b70b8ac3afcbfb5212}{modify\+Vertex\+IO} (\hyperlink{a07568}{Shader\+Generator} $\ast$\+\_\+shader)
\begin{DoxyCompactList}\small\item\em Add your own inputs/outputs to the vertex shader. \end{DoxyCompactList}\item 
virtual void \hyperlink{a07580_a501dd2d58dd6427bc91e39d89c94b94e}{modify\+Vertex\+Begin\+Code} (Q\+String\+List $\ast$\+\_\+code)
\begin{DoxyCompactList}\small\item\em Append code the the vertex shader. \end{DoxyCompactList}\item 
virtual void \hyperlink{a07580_a5f7d792c06eff3a8dda3656825db1691}{modify\+Vertex\+End\+Code} (Q\+String\+List $\ast$\+\_\+code)
\begin{DoxyCompactList}\small\item\em Append code the the vertex shader. \end{DoxyCompactList}\item 
virtual void \hyperlink{a07580_a18ccb497e9e46b32a10824c9409c9666}{modify\+Geometry\+IO} (\hyperlink{a07568}{Shader\+Generator} $\ast$\+\_\+shader)
\begin{DoxyCompactList}\small\item\em Add your own inputs/outputs to the geometry shader. \end{DoxyCompactList}\item 
virtual void \hyperlink{a07580_a5258b3fadeb7e34345aabe87aaa5479c}{modify\+Tess\+Control\+IO} (\hyperlink{a07568}{Shader\+Generator} $\ast$\+\_\+shader)
\begin{DoxyCompactList}\small\item\em Add your own inputs/outputs to the tessellation control shader. \end{DoxyCompactList}\item 
virtual void \hyperlink{a07580_a4bf90e17e6b02ae7d9fdffc96a890e07}{modify\+Tess\+Eval\+IO} (\hyperlink{a07568}{Shader\+Generator} $\ast$\+\_\+shader)
\begin{DoxyCompactList}\small\item\em Add your own inputs/outputs to the tessellation evaluation shader. \end{DoxyCompactList}\item 
virtual void \hyperlink{a07580_ae720c7104306f1e696e690760b928048}{modify\+Fragment\+IO} (\hyperlink{a07568}{Shader\+Generator} $\ast$\+\_\+shader)
\begin{DoxyCompactList}\small\item\em Add your own inputs/outputs to the fragment shader. \end{DoxyCompactList}\item 
virtual void \hyperlink{a07580_a70fe99b722072abb212f210b75e11b4b}{modify\+Fragment\+Begin\+Code} (Q\+String\+List $\ast$\+\_\+code)
\begin{DoxyCompactList}\small\item\em Append code the the fragment shader. \end{DoxyCompactList}\item 
virtual void \hyperlink{a07580_a25b1e0be6dd4a8365ecb1c72da21d310}{modify\+Fragment\+End\+Code} (Q\+String\+List $\ast$\+\_\+code)
\begin{DoxyCompactList}\small\item\em Append code the the fragment shader. \end{DoxyCompactList}\item 
virtual void \hyperlink{a07580_a0d9329675647a8d2d7c9ebd66370a30b}{modify\+Lighting\+Code} (Q\+String\+List $\ast$\+\_\+code, int \+\_\+light\+Id, Shader\+Gen\+Light\+Type \+\_\+light\+Type)
\begin{DoxyCompactList}\small\item\em Modify the default lighting code of the shader generator. \end{DoxyCompactList}\item 
virtual bool \hyperlink{a07580_a62cbca887ccde2f2953b8253886d47ee}{replace\+Default\+Lighting\+Code} ()
\begin{DoxyCompactList}\small\item\em Specify whether this modifier replaces or extends the default lighting code. \end{DoxyCompactList}\item 
unsigned int \hyperlink{a07580_af0a569920d4cf8d1e080492862ddcabf}{get\+ID} ()
\begin{DoxyCompactList}\small\item\em Returns the modifier ID. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07580_aa9de89e7cbc98ff5cad4a9004dc0a9b0}\label{a07580_aa9de89e7cbc98ff5cad4a9004dc0a9b0}} 
{\bfseries operator std\+::vector$<$ unsigned int $>$} () const
\item 
\mbox{\Hypertarget{a07580_ad4990b509a8fe3bca25682a8fb0a245a}\label{a07580_ad4990b509a8fe3bca25682a8fb0a245a}} 
std\+::vector$<$ unsigned int $>$ {\bfseries operator$\vert$} (const std\+::vector$<$ unsigned int $>$ \&\+\_\+v) const
\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{a07580}{Shader\+Modifier} $\ast$ \hyperlink{a07580_ad03f9f74a4c15b77b687b40b7c864992}{load\+From\+File} (Q\+String \+\_\+filename)
\begin{DoxyCompactList}\small\item\em Load a modifier from file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07580_a9ec21472bf02d79539bda0aa734c3f65}\label{a07580_a9ec21472bf02d79539bda0aa734c3f65}} 
unsigned int {\bfseries modifier\+I\+D\+\_\+}
\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07580_a2c432d20cb751ccdd461ee4594755dc6}\label{a07580_a2c432d20cb751ccdd461ee4594755dc6}} 
class {\bfseries Shader\+Prog\+Generator}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
A shader modifier can modify uniforms, in/outputs and glsl code of vertex and fragment shaders. This is useful for global effects like shadow mapping and depth peeling, where only little changes in code are necessary.

Usage\+:
\begin{DoxyEnumerate}
\item Derive a new subclass of \hyperlink{a07580}{Shader\+Modifier} and implement necessary modify functions.
\item Allocate a static instance of your modifier and register it to \hyperlink{a07584}{Shader\+Prog\+Generator} to get it\textquotesingle{}s modifier-\/\+ID
\item Create \hyperlink{a07584}{Shader\+Prog\+Generator} with a bitwise combination of modifier I\+Ds to activate them.
\end{DoxyEnumerate}

Example\+: 
\begin{DoxyCode}
\textcolor{comment}{// First modifier}
\textcolor{keyword}{class }VertexShaderModifier1 : \textcolor{keyword}{public} \hyperlink{a07580}{ACG::ShaderModifier} \{
\textcolor{keyword}{public}:
  \textcolor{keywordtype}{void} \hyperlink{a07580_a5f7d792c06eff3a8dda3656825db1691}{modifyVertexEndCode}(QStringList* \_code) \{
    \_code->push\_back(\textcolor{stringliteral}{"// Vertex End Code Modifier begin"});
    \_code->push\_back(\textcolor{stringliteral}{"< Some glsl code >  "});
    \_code->push\_back(\textcolor{stringliteral}{"// Vertex End Code Modifier end"});
  \}

  \textcolor{keyword}{static} VertexShaderModifier1 instance;
\};

\textcolor{comment}{// Static instance required!}
VertexShaderModifier YarnVertexShaderModifier::instance;


\textcolor{keyword}{class }VertexShaderModifier2 : \textcolor{keyword}{public} \hyperlink{a07580}{ACG::ShaderModifier} \{
\textcolor{keyword}{public}:
  \textcolor{keywordtype}{void} \hyperlink{a07580_a5f7d792c06eff3a8dda3656825db1691}{modifyVertexEndCode}(QStringList* \_code) \{
    \_code->push\_back(\textcolor{stringliteral}{"// Vertex End Code Modifier 2 begin"});
    \_code->push\_back(\textcolor{stringliteral}{"< Some glsl code >  "});
    \_code->push\_back(\textcolor{stringliteral}{"// Vertex End Code Modifier 2 end"});
  \}

  \textcolor{keyword}{static} VertexShaderModifier2 instance;
\};

VertexShaderModifier2 VertexShaderModifier2::instance;
\end{DoxyCode}


To use the modifiers, you have to register them to the shader generator\+: 
\begin{DoxyCode}
\textcolor{comment}{// Register the modifiers}
\hyperlink{a07584_a96b207003d2c540b0b676c0fa267a2ab}{ACG::ShaderProgGenerator::registerModifier}(&
      VertexShaderModifier::instance);
\hyperlink{a07584_a96b207003d2c540b0b676c0fa267a2ab}{ACG::ShaderProgGenerator::registerModifier}(&
      VertexShaderModifier2::instance);

\textcolor{comment}{// Use them via the shader cache}
\hyperlink{a08132}{GLSL::Program}* prog = \hyperlink{a07548_a25db1fcdf5081ab345e27732e0d07d56}{ACG::ShaderCache::getInstance}()->
      \hyperlink{a07548_af7e74e2c97dcea1fb3c482ea5d8560d0}{getProgram}(&shDesc,(VertexShaderModifier::instance.\hyperlink{a07580_af0a569920d4cf8d1e080492862ddcabf}{getID}() | VertexShaderModifier2::instance
      .\hyperlink{a07580_af0a569920d4cf8d1e080492862ddcabf}{getID}() ));
\end{DoxyCode}
 

Definition at line 969 of file Shader\+Generator.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a07580_af0a569920d4cf8d1e080492862ddcabf}\label{a07580_af0a569920d4cf8d1e080492862ddcabf}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!get\+ID@{get\+ID}}
\index{get\+ID@{get\+ID}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{get\+I\+D()}{getID()}}
{\footnotesize\ttfamily unsigned int A\+C\+G\+::\+Shader\+Modifier\+::get\+ID (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Returns the modifier ID. 

\begin{DoxyReturn}{Returns}
Id of the modifier 
\end{DoxyReturn}


Definition at line 1132 of file Shader\+Generator.\+hh.

\mbox{\Hypertarget{a07580_ad03f9f74a4c15b77b687b40b7c864992}\label{a07580_ad03f9f74a4c15b77b687b40b7c864992}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!load\+From\+File@{load\+From\+File}}
\index{load\+From\+File@{load\+From\+File}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{load\+From\+File()}{loadFromFile()}}
{\footnotesize\ttfamily \hyperlink{a07580}{Shader\+Modifier} $\ast$ A\+C\+G\+::\+Shader\+Modifier\+::load\+From\+File (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+filename }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Load a modifier from file. 

Shader Mod text file format\+:

The file can begin with a glsl version directive (optionally)\+: \#version glsl\+\_\+version

The rest of the file contains glsl code blocks, which are separated by keywords. Each keyword must be at the beginning of a line. Furthermore they end on a colon \textquotesingle{}\+:\textquotesingle{}. The keyword defines the meaning of the following code block.

IO code blocks are specified by the keywords\+: Vertex\+IO\+:, Tess\+Control\+IO\+:, Tess\+Eval\+IO\+:, Geometry\+IO\+: and Fragment\+IO\+:

example

Vertex\+IO\+: in vec3 custom\+Input\+Name; out vec3 custum\+Output\+Name; uniform vec4 param0;

Shader code modifications are done via the keywords\+: Vertex\+Begin\+Code\+:, Vertex\+End\+Code\+:, Fragment\+Begin\+Code\+: and Fragment\+End\+Code\+:

The returned modifier should not be deleted manually.


\begin{DoxyParams}{Parameters}
{\em \+\_\+filename} & absolute or relative (from shaderdir) file name \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to shader modifier, 0 if loading failed 
\end{DoxyReturn}


Definition at line 2724 of file Shader\+Generator.\+cc.

\mbox{\Hypertarget{a07580_a70fe99b722072abb212f210b75e11b4b}\label{a07580_a70fe99b722072abb212f210b75e11b4b}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!modify\+Fragment\+Begin\+Code@{modify\+Fragment\+Begin\+Code}}
\index{modify\+Fragment\+Begin\+Code@{modify\+Fragment\+Begin\+Code}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{modify\+Fragment\+Begin\+Code()}{modifyFragmentBeginCode()}}
{\footnotesize\ttfamily virtual void A\+C\+G\+::\+Shader\+Modifier\+::modify\+Fragment\+Begin\+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 in \hyperlink{a07556_add200998400c987dd92e4a7ef85c34eb}{A\+C\+G\+::\+Shader\+Modifier\+File}, \hyperlink{a11124_af2e9880ddf838a57035674ee9fd2cf00}{Peel\+Dual\+Layer\+Modifier}, and \hyperlink{a11116_af45caec64259f9a4ab1c26c52f551d81}{Peel\+Layer\+Modifier}.



Definition at line 1085 of file Shader\+Generator.\+hh.

\mbox{\Hypertarget{a07580_a25b1e0be6dd4a8365ecb1c72da21d310}\label{a07580_a25b1e0be6dd4a8365ecb1c72da21d310}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!modify\+Fragment\+End\+Code@{modify\+Fragment\+End\+Code}}
\index{modify\+Fragment\+End\+Code@{modify\+Fragment\+End\+Code}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{modify\+Fragment\+End\+Code()}{modifyFragmentEndCode()}}
{\footnotesize\ttfamily virtual void A\+C\+G\+::\+Shader\+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 in \hyperlink{a07556_a527fe83a0d4737fe0f70809149922a64}{A\+C\+G\+::\+Shader\+Modifier\+File}, \hyperlink{a07480_ac29e1f8e4a1112fbe375519d1bf69508}{A\+C\+G\+::\+I\+Renderer\+::\+Depth\+Map\+Pass}, \hyperlink{a11128_a1f8ff4872e6e5b1caf1dddbcd10924f8}{Peel\+Dual\+Init\+Modifier}, \hyperlink{a11124_a10eea4a556f4dd572f88b404252a2066}{Peel\+Dual\+Layer\+Modifier}, \hyperlink{a11120_ad37b82ee9095d802ab3a449cc8e39d7d}{Peel\+Init\+Modifier}, \hyperlink{a11168_a81ad6e4358ff91486456dd2b687bf1c3}{Cel\+Shading\+Modifier}, \hyperlink{a11116_a8bf411eaeda3051cd02acdd33e888aa9}{Peel\+Layer\+Modifier}, and \hyperlink{a11140_a0c228f43b14edc4bc6d41649f0164aac}{Normal\+Fragment\+Modifier}.



Definition at line 1101 of file Shader\+Generator.\+hh.

\mbox{\Hypertarget{a07580_ae720c7104306f1e696e690760b928048}\label{a07580_ae720c7104306f1e696e690760b928048}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!modify\+Fragment\+IO@{modify\+Fragment\+IO}}
\index{modify\+Fragment\+IO@{modify\+Fragment\+IO}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{modify\+Fragment\+I\+O()}{modifyFragmentIO()}}
{\footnotesize\ttfamily virtual void A\+C\+G\+::\+Shader\+Modifier\+::modify\+Fragment\+IO (\begin{DoxyParamCaption}\item[{\hyperlink{a07568}{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 in \hyperlink{a07556_adc1e1f9267d357bf62dce59b51030490}{A\+C\+G\+::\+Shader\+Modifier\+File}, \hyperlink{a11124_a33b6b1ae2d58336249113668ba290614}{Peel\+Dual\+Layer\+Modifier}, \hyperlink{a11120_af78f07838d5bdc7dffba95b29abade7d}{Peel\+Init\+Modifier}, \hyperlink{a11168_aa22486aa3db6eed67b581729ae55b798}{Cel\+Shading\+Modifier}, and \hyperlink{a11116_a72be1c05b31ef4b3088fa8994aaa2608}{Peel\+Layer\+Modifier}.



Definition at line 1069 of file Shader\+Generator.\+hh.

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



Add your own inputs/outputs to the geometry 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 in \hyperlink{a07556_a0feda1c48cdda26ab4aedf931498a8e3}{A\+C\+G\+::\+Shader\+Modifier\+File}.



Definition at line 1030 of file Shader\+Generator.\+hh.

\mbox{\Hypertarget{a07580_a0d9329675647a8d2d7c9ebd66370a30b}\label{a07580_a0d9329675647a8d2d7c9ebd66370a30b}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!modify\+Lighting\+Code@{modify\+Lighting\+Code}}
\index{modify\+Lighting\+Code@{modify\+Lighting\+Code}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{modify\+Lighting\+Code()}{modifyLightingCode()}}
{\footnotesize\ttfamily virtual void A\+C\+G\+::\+Shader\+Modifier\+::modify\+Lighting\+Code (\begin{DoxyParamCaption}\item[{Q\+String\+List $\ast$}]{\+\_\+code,  }\item[{int}]{\+\_\+light\+Id,  }\item[{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 in \hyperlink{a11168_a55899bf3273f452cc4150666aba57c62}{Cel\+Shading\+Modifier}.



Definition at line 1120 of file Shader\+Generator.\+hh.

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



Add your own inputs/outputs to the tessellation control 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 in \hyperlink{a07556_abaf389f03e0d93a05c047dfa1374a82d}{A\+C\+G\+::\+Shader\+Modifier\+File}.



Definition at line 1043 of file Shader\+Generator.\+hh.

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



Add your own inputs/outputs to the tessellation evaluation 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 in \hyperlink{a07556_a6c93242b747ff60aa7155ef091994f88}{A\+C\+G\+::\+Shader\+Modifier\+File}.



Definition at line 1056 of file Shader\+Generator.\+hh.

\mbox{\Hypertarget{a07580_a501dd2d58dd6427bc91e39d89c94b94e}\label{a07580_a501dd2d58dd6427bc91e39d89c94b94e}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!modify\+Vertex\+Begin\+Code@{modify\+Vertex\+Begin\+Code}}
\index{modify\+Vertex\+Begin\+Code@{modify\+Vertex\+Begin\+Code}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{modify\+Vertex\+Begin\+Code()}{modifyVertexBeginCode()}}
{\footnotesize\ttfamily virtual void A\+C\+G\+::\+Shader\+Modifier\+::modify\+Vertex\+Begin\+Code (\begin{DoxyParamCaption}\item[{Q\+String\+List $\ast$}]{\+\_\+code }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Append code the the vertex 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 in \hyperlink{a07556_ac959d207bd23ecdb252887b54aa5111c}{A\+C\+G\+::\+Shader\+Modifier\+File}, and \hyperlink{a07768_ad0ef566e11007578eb6546a6623eacf0}{A\+C\+G\+::\+Scene\+Graph\+::\+Clipping\+Node\+::\+Clipping\+Shader\+Modifier}.



Definition at line 1002 of file Shader\+Generator.\+hh.

\mbox{\Hypertarget{a07580_a5f7d792c06eff3a8dda3656825db1691}\label{a07580_a5f7d792c06eff3a8dda3656825db1691}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!modify\+Vertex\+End\+Code@{modify\+Vertex\+End\+Code}}
\index{modify\+Vertex\+End\+Code@{modify\+Vertex\+End\+Code}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{modify\+Vertex\+End\+Code()}{modifyVertexEndCode()}}
{\footnotesize\ttfamily virtual void A\+C\+G\+::\+Shader\+Modifier\+::modify\+Vertex\+End\+Code (\begin{DoxyParamCaption}\item[{Q\+String\+List $\ast$}]{\+\_\+code }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Append code the the vertex 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 in \hyperlink{a07556_a0bd734e571045e10426f5657a01dff09}{A\+C\+G\+::\+Shader\+Modifier\+File}.



Definition at line 1017 of file Shader\+Generator.\+hh.

\mbox{\Hypertarget{a07580_a0692498de2b752b70b8ac3afcbfb5212}\label{a07580_a0692498de2b752b70b8ac3afcbfb5212}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!modify\+Vertex\+IO@{modify\+Vertex\+IO}}
\index{modify\+Vertex\+IO@{modify\+Vertex\+IO}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{modify\+Vertex\+I\+O()}{modifyVertexIO()}}
{\footnotesize\ttfamily virtual void A\+C\+G\+::\+Shader\+Modifier\+::modify\+Vertex\+IO (\begin{DoxyParamCaption}\item[{\hyperlink{a07568}{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 in \hyperlink{a07556_ac07111d99ecb297d0472d3903819716d}{A\+C\+G\+::\+Shader\+Modifier\+File}, \hyperlink{a07768_a9bd4815ec74a2844c3ff2479481fcd6a}{A\+C\+G\+::\+Scene\+Graph\+::\+Clipping\+Node\+::\+Clipping\+Shader\+Modifier}, \hyperlink{a11168_afeb08b63efc70cff2fd31da965956d5e}{Cel\+Shading\+Modifier}, and \hyperlink{a11140_a6bfe2475dc55e89b72b8fda7144aa5ae}{Normal\+Fragment\+Modifier}.



Definition at line 988 of file Shader\+Generator.\+hh.

\mbox{\Hypertarget{a07580_a62cbca887ccde2f2953b8253886d47ee}\label{a07580_a62cbca887ccde2f2953b8253886d47ee}} 
\index{A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}!replace\+Default\+Lighting\+Code@{replace\+Default\+Lighting\+Code}}
\index{replace\+Default\+Lighting\+Code@{replace\+Default\+Lighting\+Code}!A\+C\+G\+::\+Shader\+Modifier@{A\+C\+G\+::\+Shader\+Modifier}}
\subsubsection{\texorpdfstring{replace\+Default\+Lighting\+Code()}{replaceDefaultLightingCode()}}
{\footnotesize\ttfamily virtual bool A\+C\+G\+::\+Shader\+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 in \hyperlink{a11168_a7ab6159c2138c3da3e143e85acb67110}{Cel\+Shading\+Modifier}.



Definition at line 1126 of file Shader\+Generator.\+hh.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/Shader\+Generator.\+hh\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/Shader\+Generator.\+cc\end{DoxyCompactItemize}
