Commit df761809 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added Block diagrams for shader construction

parent 30eea56a
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" stroke="black" text-rendering="auto" stroke-linecap="square" width="1020" stroke-miterlimit="10" stroke-opacity="1" shape-rendering="auto" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="320 200 1020 830" height="830" xmlns="http://www.w3.org/2000/svg" font-family="&apos;Dialog&apos;" font-style="normal" stroke-linejoin="miter" font-size="12" stroke-dashoffset="0" image-rendering="auto"
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
/><g
><defs id="defs1"
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
><path d="M0 0 L0 270 L310 270 L310 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
><path d="M0 0 L0 70 L190 70 L190 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
><path d="M0 0 L0 120 L200 120 L200 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
><path d="M0 0 L0 450 L370 450 L370 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
><path d="M0 0 L0 200 L200 200 L200 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"
><path d="M0 0 L0 40 L70 40 L70 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath8"
><path d="M0 0 L0 40 L200 40 L200 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath9"
><path d="M0 0 L0 180 L210 180 L210 0 Z"
/></clipPath
></defs
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(470,740)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="308.5" height="268.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
/></g
><g transform="translate(470,740)"
><rect fill="none" x="0.5" width="308.5" height="268.5" y="0.5" clip-path="url(#clipPath2)"
/><text x="55" font-size="14" y="17.9688" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Geometry Shader Template File</text
><path fill="none" d="M1 23.9688 L309 23.9688" clip-path="url(#clipPath2)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // custom IO, uniforms, includes etc.</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>[..]</text
><text x="5" font-size="14" y="102.8125" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // main function</text
><text x="5" font-size="14" y="134.75" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>void main()</text
><text x="5" font-size="14" y="150.7188" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>{</text
><text x="5" font-size="14" y="182.6562" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // shader code</text
><text x="5" font-size="14" y="198.625" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
> [..]</text
><text x="5" font-size="14" y="214.5938" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>}</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(340,250)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="188.5" height="68.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
/></g
><g transform="translate(340,250)"
><rect fill="none" x="0.5" width="188.5" height="68.5" y="0.5" clip-path="url(#clipPath3)"
/><text x="45" font-size="14" y="17.9688" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Shader Modifier</text
><path fill="none" d="M1 23.9688 L189 23.9688" clip-path="url(#clipPath3)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>modifyGeometryIO()</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(470,410)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="308.5" height="268.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
/></g
><g transform="translate(470,410)"
><rect fill="none" x="0.5" width="308.5" height="268.5" y="0.5" clip-path="url(#clipPath2)"
/><text x="102" font-size="14" y="17.9688" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Default Uniforms</text
><path fill="none" d="M1 23.9688 L309 23.9688" clip-path="url(#clipPath2)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>mat4 g_mWVP; // world view proj</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>mat4 g_mWV; // world view</text
><text x="5" font-size="14" y="86.8438" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>mat3 g_mWVIT; // world view inverse transpose</text
><text x="5" font-size="14" y="102.8125" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>mat4 g_mP; // proj</text
><text x="5" font-size="14" y="134.75" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_vCamPos; // cam-pos in world</text
><text x="5" font-size="14" y="150.7188" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_vCamDir; // cam-dir in world</text
><text x="5" font-size="14" y="182.6562" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_cDiffuse; // diffuse color</text
><text x="5" font-size="14" y="198.625" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_cAmbient; // ambient color</text
><text x="5" font-size="14" y="214.5938" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_cEmissive; // emissive color</text
><text x="5" font-size="14" y="230.5625" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_cSpecular; // specular color</text
><text x="5" font-size="14" y="246.5312" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec4 g_vMaterial; // (shininess, alpha, 0, 0)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(570,220)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="198.5" height="118.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(570,220)"
><rect fill="none" x="0.5" width="198.5" height="118.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="37" font-size="14" y="17.9688" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>IO stage processing</text
><path fill="none" d="M1 23.9688 L199 23.9688" clip-path="url(#clipPath4)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>standard in/out defines</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>shader mod IO / uniforms</text
><text x="5" font-size="14" y="86.8438" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>shader mod includes</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(950,370)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="368.5" height="448.5" y="0.5" clip-path="url(#clipPath5)" stroke="none"
/></g
><g transform="translate(950,370)"
><rect fill="none" x="0.5" width="368.5" height="448.5" y="0.5" clip-path="url(#clipPath5)"
/><text x="111" font-size="14" y="17.9688" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Geometry Shader Code</text
><path fill="none" d="M1 23.9688 L369 23.9688" clip-path="url(#clipPath5)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // IO block</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>[..]</text
><text x="5" font-size="14" y="102.8125" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // default uniform block</text
><text x="5" font-size="14" y="118.7812" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>[..]</text
><text x="5" font-size="14" y="150.7188" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // (helper) passthrough IO mapping</text
><text x="5" font-size="14" y="166.6875" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>void sg_MapIO(const int inIdx)</text
><text x="5" font-size="14" y="182.6562" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>{</text
><text x="5" font-size="14" y="198.625" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> gl_Position = gl_in[inIdx].gl_Position;</text
><text x="5" font-size="14" y="214.5938" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> gl_PrimitiveID = gl_PrimitiveIDIn;</text
><text x="5" font-size="14" y="230.5625" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> SG_OUTPUT_X = SG_INPUT_X[inIdx];</text
><text x="5" font-size="14" y="246.5312" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>}</text
><text x="5" font-size="14" y="278.4688" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // template code</text
><text x="5" font-size="14" y="294.4375" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>[..]</text
></g
><g transform="translate(770,650)"
><path fill="none" d="M180.5 10.5 L120.5 10.5" clip-path="url(#clipPath6)"
/><path fill="none" d="M120.5 10.5 L120.5 180.5" clip-path="url(#clipPath6)"
/><path fill="none" d="M120.5 180.5 L10.5 180.5" clip-path="url(#clipPath6)"
/><path fill="none" d="M169.2417 4 L180.5 10.5 L169.2417 17" clip-path="url(#clipPath6)"
/></g
><g transform="translate(520,270)"
><path fill="none" d="M50.5 20.5 L10.5 20.5" clip-path="url(#clipPath7)"
/><path fill="none" d="M39.2417 14 L50.5 20.5 L39.2417 27" clip-path="url(#clipPath7)"
/></g
><g transform="translate(770,460)"
><path fill="none" d="M180.5 20.5 L10.5 20.5" clip-path="url(#clipPath8)"
/><path fill="none" d="M169.2417 14 L180.5 20.5 L169.2417 27" clip-path="url(#clipPath8)"
/></g
><g transform="translate(760,280)"
><path fill="none" d="M190.5 160.5 L120.5 160.5" clip-path="url(#clipPath9)"
/><path fill="none" d="M120.5 160.5 L120.5 10.5" clip-path="url(#clipPath9)"
/><path fill="none" d="M120.5 10.5 L10.5 10.5" clip-path="url(#clipPath9)"
/><path fill="none" d="M179.2417 154 L190.5 160.5 L179.2417 167" clip-path="url(#clipPath9)"
/></g
></g
></svg
>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" stroke="black" text-rendering="auto" stroke-linecap="square" width="1150" stroke-miterlimit="10" stroke-opacity="1" shape-rendering="auto" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="110 260 1150 580" height="580" xmlns="http://www.w3.org/2000/svg" font-family="&apos;Dialog&apos;" font-style="normal" stroke-linejoin="miter" font-size="12" stroke-dashoffset="0" image-rendering="auto"
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
/><g
><defs id="defs1"
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
><path d="M0 0 L0 70 L150 70 L150 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
><path d="M0 0 L0 160 L170 160 L170 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
><path d="M0 0 L0 160 L180 160 L180 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
><path d="M0 0 L0 140 L190 140 L190 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
><path d="M0 0 L0 150 L130 150 L130 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"
><path d="M0 0 L0 100 L380 100 L380 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath8"
><path d="M0 0 L0 50 L190 50 L190 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath9"
><path d="M0 0 L0 120 L180 120 L180 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath10"
><path d="M0 0 L0 60 L210 60 L210 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath11"
><path d="M0 0 L0 120 L380 120 L380 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath12"
><path d="M0 0 L0 80 L290 80 L290 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath13"
><path d="M0 0 L0 220 L270 220 L270 0 Z"
/></clipPath
></defs
><g font-family="sans-serif" font-size="14" transform="translate(180,330)"
><text x="5" xml:space="preserve" y="17.9688" clip-path="url(#clipPath2)" stroke="none"
>IO stage processing</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(1070,510)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="168.5" height="158.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
/></g
><g transform="translate(1070,510)"
><rect fill="none" x="0.5" width="168.5" height="158.5" y="0.5" clip-path="url(#clipPath3)"
/><text x="30" font-size="14" y="17.9688" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Fragment Shader</text
><path fill="none" d="M1 23.9688 L169 23.9688" clip-path="url(#clipPath3)"
/><text x="5" font-size="14" y="38.9375" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>SG_INPUT_X</text
><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>SG_OUTPUT_X</text
><text x="5" font-size="14" y="86.8438" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>in vec3 v2f_myFragData;</text
><text x="5" font-size="14" y="118.7812" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>uniform float myData;</text
><text x="5" font-size="14" y="134.75" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>...</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(800,510)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="178.5" height="158.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(800,510)"
><rect fill="none" x="0.5" width="178.5" height="158.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="45" font-size="14" y="17.9688" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Vertex Shader</text
><path fill="none" d="M1 23.9688 L179 23.9688" clip-path="url(#clipPath4)"
/><text x="5" font-size="14" y="38.9375" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>SG_INPUT_X</text
><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>SG_OUTPUT_X</text
><text x="5" font-size="14" y="86.8438" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>in vec4 myTemplateAttr;</text
><text x="5" font-size="14" y="102.8125" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>in vec3 myCustomAttr;</text
><text x="5" font-size="14" y="118.7812" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>out vec4 v2f_myFragData;</text
><text x="5" font-size="14" y="150.7188" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>uniform float myData; ...</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(800,280)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="188.5" height="138.5" y="0.5" clip-path="url(#clipPath5)" stroke="none"
/></g
><g transform="translate(800,280)"
><rect fill="none" x="0.5" width="188.5" height="138.5" y="0.5" clip-path="url(#clipPath5)"
/><text x="0" font-size="14" y="17.9688" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Template Vertex Shader Code</text
><path fill="none" d="M1 23.9688 L189 23.9688" clip-path="url(#clipPath5)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>#define SG_REQUEST_X</text
><text x="5" font-size="14" y="86.8438" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>in vec4 myTemplateAttr;</text
><text x="5" font-size="14" y="118.7812" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>void main() ...</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(450,510)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="168.5" height="158.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
/></g
><g transform="translate(450,510)"
><rect fill="none" x="0.5" width="168.5" height="158.5" y="0.5" clip-path="url(#clipPath3)"
/><text x="13" font-size="14" y="17.9688" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Stage in/out Descriptor</text
><path fill="none" d="M1 23.9688 L169 23.9688" clip-path="url(#clipPath3)"
/><text x="5" font-size="14" y="38.9375" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>object space pos</text
><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>view space pos</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>object space normal</text
><text x="5" font-size="14" y="86.8438" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>view space normal</text
><text x="5" font-size="14" y="102.8125" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>texcoord</text
><text x="5" font-size="14" y="118.7812" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vertex color</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(130,670)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="128.5" height="148.5" y="0.5" clip-path="url(#clipPath6)" stroke="none"
/></g
><g transform="translate(130,670)"
><rect fill="none" x="0.5" width="128.5" height="148.5" y="0.5" clip-path="url(#clipPath6)"
/><text x="40" font-size="14" y="17.9688" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Modifier</text
><path fill="none" d="M1 23.9688 L129 23.9688" clip-path="url(#clipPath6)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>modifyIO()</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>modifyBeginCode()</text
><text x="5" font-size="14" y="86.8438" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>modifyEndCode()</text
></g
><g transform="translate(810,660)"
><path fill="none" d="M10.5 60.5 L360.5 60.5" clip-path="url(#clipPath7)"
/><path fill="none" d="M360.5 60.5 L360.5 10.5" clip-path="url(#clipPath7)"
/><path fill="none" d="M367 21.7583 L360.5 10.5 L354 21.7583" clip-path="url(#clipPath7)"
/><text x="108.2832" font-size="14" y="71.9688" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>in vec4 v2f_myFragData;</text
><text x="119.5459" font-size="14" y="87.9375" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>uniform float myData;</text
></g
><g transform="translate(900,530)"
><path fill="none" d="M170.5 10.5 L10.5 30.5" clip-path="url(#clipPath8)"
/><path fill="none" d="M158.5224 5.4466 L170.5 10.5 L160.1348 18.3462" clip-path="url(#clipPath8)"
/></g
><g transform="translate(810,410)"
><path fill="none" d="M10.5 100.5 L10.5 10.5" clip-path="url(#clipPath9)"
/><path fill="none" d="M17 89.2417 L10.5 100.5 L4 89.2417" clip-path="url(#clipPath9)"
/><text x="14" font-size="14" y="62.9844" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>in vec4 myTemplateAttr;</text
></g
><g transform="translate(610,530)"
><path fill="none" d="M10.5 20.5 L190.5 20.5" clip-path="url(#clipPath10)"
/><path fill="none" d="M179.2417 27 L190.5 20.5 L179.2417 14" clip-path="url(#clipPath10)"
/><text x="26.3657" font-size="14" y="31.9688" clip-path="url(#clipPath10)" font-family="sans-serif" stroke="none" xml:space="preserve"
>#define SG_INPUT_X ..</text
><text x="23.8594" font-size="14" y="47.9375" clip-path="url(#clipPath10)" font-family="sans-serif" stroke="none" xml:space="preserve"
>#define SG_OUTPUT_X</text
></g
><g transform="translate(460,660)"
><path fill="none" d="M10.5 60.5 L360.5 60.5" clip-path="url(#clipPath11)"
/><path fill="none" d="M360.5 60.5 L360.5 10.5" clip-path="url(#clipPath11)"
/><path fill="none" d="M367 21.7583 L360.5 10.5 L354 21.7583" clip-path="url(#clipPath11)"
/><text x="115.6865" font-size="14" y="71.9688" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" xml:space="preserve"
>in vec3 myCustomAttr;</text
><text x="103.7661" font-size="14" y="87.9375" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" xml:space="preserve"
>out vec4 v2f_myFragData;</text
><text x="119.5459" font-size="14" y="103.9062" clip-path="url(#clipPath11)" font-family="sans-serif" stroke="none" xml:space="preserve"
>uniform float myData;</text
></g
><g transform="translate(200,660)"
><path fill="none" d="M10.5 60.5 L270.5 60.5" clip-path="url(#clipPath12)"
/><path fill="none" d="M270.5 60.5 L270.5 10.5" clip-path="url(#clipPath12)"
/><path fill="none" d="M277 21.7583 L270.5 10.5 L264 21.7583" clip-path="url(#clipPath12)"
/><text x="83.9497" font-size="14" y="56" clip-path="url(#clipPath12)" font-family="sans-serif" stroke="none" xml:space="preserve"
>SG_REQUEST_X</text
></g
><g transform="translate(550,310)"
><path fill="none" d="M250.5 20.5 L10.5 20.5" clip-path="url(#clipPath13)"
/><path fill="none" d="M10.5 20.5 L10.5 200.5" clip-path="url(#clipPath13)"
/><path fill="none" d="M4 189.2417 L10.5 200.5 L17 189.2417" clip-path="url(#clipPath13)"
/><text x="73.9497" font-size="14" y="16" clip-path="url(#clipPath13)" font-family="sans-serif" stroke="none" xml:space="preserve"
>SG_REQUEST_X</text
></g
></g
></svg
>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" stroke="black" text-rendering="auto" stroke-linecap="square" width="1020" stroke-miterlimit="10" stroke-opacity="1" shape-rendering="auto" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="400 130 1020 830" height="830" xmlns="http://www.w3.org/2000/svg" font-family="&apos;Dialog&apos;" font-style="normal" stroke-linejoin="miter" font-size="12" stroke-dashoffset="0" image-rendering="auto"
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
/><g
><defs id="defs1"
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
><path d="M0 0 L0 270 L310 270 L310 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
><path d="M0 0 L0 70 L190 70 L190 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
><path d="M0 0 L0 120 L200 120 L200 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
><path d="M0 0 L0 450 L370 450 L370 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
><path d="M0 0 L0 200 L200 200 L200 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"
><path d="M0 0 L0 40 L70 40 L70 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath8"
><path d="M0 0 L0 40 L200 40 L200 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath9"
><path d="M0 0 L0 180 L210 180 L210 0 Z"
/></clipPath
></defs
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(550,670)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="308.5" height="268.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
/></g
><g transform="translate(550,670)"
><rect fill="none" x="0.5" width="308.5" height="268.5" y="0.5" clip-path="url(#clipPath2)"
/><text x="46" font-size="14" y="17.9688" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Tess-Control Shader Template File</text
><path fill="none" d="M1 23.9688 L309 23.9688" clip-path="url(#clipPath2)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // custom IO, uniforms, includes etc.</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>[..]</text
><text x="5" font-size="14" y="102.8125" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // main function</text
><text x="5" font-size="14" y="134.75" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>void main()</text
><text x="5" font-size="14" y="150.7188" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>{</text
><text x="5" font-size="14" y="182.6562" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // shader code</text
><text x="5" font-size="14" y="198.625" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
> [..]</text
><text x="5" font-size="14" y="214.5938" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>}</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(420,180)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="188.5" height="68.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
/></g
><g transform="translate(420,180)"
><rect fill="none" x="0.5" width="188.5" height="68.5" y="0.5" clip-path="url(#clipPath3)"
/><text x="45" font-size="14" y="17.9688" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Shader Modifier</text
><path fill="none" d="M1 23.9688 L189 23.9688" clip-path="url(#clipPath3)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>modifyTessControlIO()</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(550,340)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="308.5" height="268.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
/></g
><g transform="translate(550,340)"
><rect fill="none" x="0.5" width="308.5" height="268.5" y="0.5" clip-path="url(#clipPath2)"
/><text x="102" font-size="14" y="17.9688" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Default Uniforms</text
><path fill="none" d="M1 23.9688 L309 23.9688" clip-path="url(#clipPath2)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>mat4 g_mWVP; // world view proj</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>mat4 g_mWV; // world view</text
><text x="5" font-size="14" y="86.8438" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>mat3 g_mWVIT; // world view inverse transpose</text
><text x="5" font-size="14" y="102.8125" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>mat4 g_mP; // proj</text
><text x="5" font-size="14" y="134.75" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_vCamPos; // cam-pos in world</text
><text x="5" font-size="14" y="150.7188" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_vCamDir; // cam-dir in world</text
><text x="5" font-size="14" y="182.6562" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_cDiffuse; // diffuse color</text
><text x="5" font-size="14" y="198.625" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_cAmbient; // ambient color</text
><text x="5" font-size="14" y="214.5938" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_cEmissive; // emissive color</text
><text x="5" font-size="14" y="230.5625" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec3 g_cSpecular; // specular color</text
><text x="5" font-size="14" y="246.5312" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>vec4 g_vMaterial; // (shininess, alpha, 0, 0)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(650,150)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="198.5" height="118.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(650,150)"
><rect fill="none" x="0.5" width="198.5" height="118.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="37" font-size="14" y="17.9688" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>IO stage processing</text
><path fill="none" d="M1 23.9688 L199 23.9688" clip-path="url(#clipPath4)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>standard in/out defines</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>shader mod IO / uniforms</text
><text x="5" font-size="14" y="86.8438" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>shader mod includes</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(1030,300)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="368.5" height="448.5" y="0.5" clip-path="url(#clipPath5)" stroke="none"
/></g
><g transform="translate(1030,300)"
><rect fill="none" x="0.5" width="368.5" height="448.5" y="0.5" clip-path="url(#clipPath5)"
/><text x="79" font-size="14" y="17.9688" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>Tessellation Control Shader Code</text
><path fill="none" d="M1 23.9688 L369 23.9688" clip-path="url(#clipPath5)"
/><text x="5" font-size="14" y="54.9062" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // IO block</text
><text x="5" font-size="14" y="70.875" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>[..]</text
><text x="5" font-size="14" y="102.8125" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // default uniform block</text
><text x="5" font-size="14" y="118.7812" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>[..]</text
><text x="5" font-size="14" y="150.7188" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // (helper) passthrough IO mapping</text
><text x="5" font-size="14" y="166.6875" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>void sg_MapIO(const int inIdx, const int outIdx)</text
><text x="5" font-size="14" y="182.6562" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>{</text
><text x="5" font-size="14" y="198.625" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> gl_Position[outIdx] = gl_in[inIdx].gl_Position;</text
><text x="5" font-size="14" y="214.5938" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> SG_OUTPUT_X[outIdx] = SG_INPUT_X[inIdx];</text
><text x="5" font-size="14" y="230.5625" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>}</text
><text x="5" font-size="14" y="278.4688" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
> // template code</text
><text x="5" font-size="14" y="294.4375" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>[..]</text
></g
><g transform="translate(850,580)"
><path fill="none" d="M180.5 10.5 L120.5 10.5" clip-path="url(#clipPath6)"
/><path fill="none" d="M120.5 10.5 L120.5 180.5" clip-path="url(#clipPath6)"
/><path fill="none" d="M120.5 180.5 L10.5 180.5" clip-path="url(#clipPath6)"
/><path fill="none" d="M169.2417 4 L180.5 10.5 L169.2417 17" clip-path="url(#clipPath6)"
/></g
><g transform="translate(600,200)"
><path fill="none" d="M50.5 20.5 L10.5 20.5" clip-path="url(#clipPath7)"
/><path fill="none" d="M39.2417 14 L50.5 20.5 L39.2417 27" clip-path="url(#clipPath7)"
/></g
><g transform="translate(850,390)"
><path fill="none" d="M180.5 20.5 L10.5 20.5" clip-path="url(#clipPath8)"
/><path fill="none" d="M169.2417 14 L180.5 20.5 L169.2417 27" clip-path="url(#clipPath8)"
/></g
><g transform="translate(840,210)"
><path fill="none" d="M190.5 160.5 L120.5 160.5" clip-path="url(#clipPath9)"
/><path fill="none" d="M120.5 160.5 L120.5 10.5" clip-path="url(#clipPath9)"
/><path fill="none" d="M120.5 10.5 L10.5 10.5" clip-path="url(#clipPath9)"
/><path fill="none" d="M179.2417 154 L190.5 160.5 L179.2417 167" clip-path="url(#clipPath9)"
/></g
></g
></svg
>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" stroke="black" text-rendering="auto" stroke-linecap="square" width="1020" stroke-miterlimit="10" stroke-opacity="1" shape-rendering="auto" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="270 20 1020 920" height="920" xmlns="http://www.w3.org/2000/svg" font-family="&apos;Dialog&apos;" font-style="normal" stroke-linejoin="miter" font-size="12" stroke-dashoffset="0" image-rendering="auto"
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
/><g
><defs id="defs1"
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
><path d="M0 0 L0 360 L320 360 L320 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
><path d="M0 0 L0 70 L190 70 L190 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
><path d="M0 0 L0 270 L310 270 L310 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
><path d="M0 0 L0 120 L200 120 L200 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
><path d="M0 0 L0 670 L370 670 L370 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"