1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
3<!-- InstanceBegin template="/Templates/default_template.dwt" codeOutsideHTMLIsLocked="false" -->
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<meta http-equiv="Content-Style-Type" content="text/css" />
7<!-- InstanceBeginEditable name="CSS の相対パス指定" -->
8<link href="../../../common/manual.css" rel="stylesheet" type="text/css" />
9<!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="ページのタイトル" -->
10<title>Material Pipeline</title>
11<!-- InstanceEndEditable -->
12</head>
13<body>
14<div>
15  <div class="body"> <!-- InstanceBeginEditable name="本文のタイトル" -->
16    <h1>Material Pipeline</h1>
17    <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="本文" -->
18    <p>This section describes the <I>pipeline</I> (the flow) in which the the data configured in the CreativeStudio material <B>Properties </B>panel are used by the hardware. </p>
19    <h2>Material Pipeline Diagram</h2>
20    <p>The hardware processes <em>polygon model data</em> and <em>texture image data</em> according to the parameters set in the CreativeStudio <B>Properties </B>panel for materials and displays the result on the screen.</p>
21    <p>The figure below shows the process flow in the hardware.</p>
22    <img class="user_guide_chart" src="assets/material_pipeline_pipeline.png" alt="Material Pipeline Diagram"/><!-- #BeginLibraryItem "/Library/glossary_buffer.lbi" --> <!-- バッファ ( buffer )  -->
23    <p>A <I>buffer </I>is a memory region where information can be temporarily stored and retrieved while processing is taking place.</p>
24    <p>Since different kinds of information are handled by different buffers, the buffers are named to reflect which kind of information they handle.</p>
25    <!-- #EndLibraryItem --> <!-- エクセルで言うところのウィンドウ枠の固定を希望! -->
26    <h2>Description of Pipeline Elements</h2>
27    <p>This section describes each of the pipeline elements along with the process flow in hardware.</p>
28    <h3>Vertex Buffer</h3>
29    <!-- #BeginLibraryItem "/Library/glossary_vertex_buffer.lbi" --> <!-- 頂点バッファ ( vertex_buffer) -->
30    <p>The <em>vertex buffer</em> is a region of memory used to store <em><a href="../../../glossary/index.html#vertex_attribute">vertex attribute</a> information</em> included in a polygon model. </p>
31    <p>It is used by the<I>vertex shader</I> and the <I>geometry shader</I>.</p>
32    <!-- #EndLibraryItem -->
33    <h3>Vertex Operations (Vertex Shader)</h3>
34    <!-- #BeginLibraryItem "/Library/glossary_vertex_shader.lbi" --> <!-- 頂点シェーダー ( vertex_shader ) -->
35    <p><I>Vertex operations</I> apply lighting and shading to individual vertices based on information and <I>vertex attributes</I> from the vertex buffer.<br /></p>
36    <p>The process is also called the <I>vertex shader</I>.</p>
37    <!-- #EndLibraryItem -->
38    <p class="hint"><em>Vertex shader</em> processing is complete at this stage.</p>
39    <h3>Triangle Setup and the Rasterizing Process</h3>
40    <p>This data processed by the vertex shader and geometry shader are passed through the <a href="../../../glossary/index.html#triangle_setup">triangle setup</a> process and the <a href="../../../glossary/index.html#vertex_rasterize">rasterizing process</a> and converted into data for <a href="../../../glossary/index.html#fragment">fragments</a>.</p>
41    <p>The following figure is an image that depicts polygon assembly and per-fragment correction by the <em>rasterizing process</em> after shading has been applied by the vertex process. </p>
42    <p>The quality of the lighting result is affected by polygon density.</p>
43    <div>  <img class="user_guide_chart" src="assets/material_pipeline_rasterize.png" alt="Rasterization"/></div>
44    <p class="warning">During <em>triangle setup</em>, vertex data is converted to optimal conditions.<br /> Vertex information is linked by a more efficient method and configured as a polygon model.</p>
45    <h3>Texel Operations</h3>
46    <p><a href="../../../glossary/index.html#texel_process">Texel operations</a> compute the correspondences between the texture coordinates that were input from the vertex shader and the image that was input from <a href="../../../glossary/index.html#texture_memory">texture memory</a>.</p>
47    <p>The table below lists the texel operations done with CreativeStudio.</p>
48    <h4>Applying changes visible to the eye</h4>
49    <table>
50      <thead>
51        <tr>
52          <th>Type</th>
53          <th>Description</th>
54        </tr>
55      </thead>
56      <tbody>
57        <tr>
58          <th>Attach image</th>
59          <td>Attaches an image to a polygon surface and applies changes visible to the eye.</td>
60        </tr>
61        <tr>
62          <th>Mipmaps</th>
63          <td>Uses a special texture.<br /> The optimal resolution is automatically selected based on the area projected on the screen when graphics having different resolutions exist together in a single texture image.</td>
64        </tr>
65      </tbody>
66    </table>
67    <h4>Related to texture coordinate mapping</h4>
68    <table>
69      <thead>
70        <tr>
71          <th>Type</th>
72          <th>Description</th>
73        </tr>
74      </thead>
75      <tbody>
76        <tr>
77          <th>Camera cubic environment</th>
78          <td>Uses a special texture as one environment map.<br /> The surrounding image is seen to be reflected in all directions of the object.</td>
79        </tr>
80        <tr>
81          <th>Camera spherical environment</th>
82          <td>Uses a special texture as one environment map.<br /> The surrounding image is seen to be reflected in parts of the object that can be seen from the viewpoint.</td>
83        </tr>
84      </tbody>
85    </table>
86    <h4>Applying effects to normal vectors of polygons</h4>
87    <table>
88      <thead>
89        <tr>
90          <th>Type</th>
91          <th>Description</th>
92        </tr>
93      </thead>
94      <tbody>
95        <tr>
96          <th>Bump map</th>
97          <td>Uses a special texture.<br /> Shading is expressed by applying a weight to the normal vector on each color channel of the image.</td>
98        </tr>
99        <tr>
100          <th>Tangent map</th>
101          <td>Uses a special texture.<br /> Highlighted shapes are warped by applying a weight to the tangent on each color channel of the image.</td>
102        </tr>
103      </tbody>
104    </table>
105    <h3>Fragment lighting</h3>
106    <!-- #BeginLibraryItem "/Library/glossary_fragment_lighting.lbi" --> <!-- フラグメントライティング ( fragment_lighting ) -->
107    <p><em>Fragment lighting</em> is a process that applies shadows on a per-fragment basis to information output from the vertex process.  More complex lighting expressions are possible using lookup tables.</p>
108    <p>The figure below shows shading applied to fragments for interpolated normal vectors provided as input values from the vertex shader. The quality of the lighting result is not affected by the polygon density.</p>
109    <img class="user_guide_chart" src="assets/material_pipeline_fragmentshader.png" alt="Fragment shader flow"/><!-- #EndLibraryItem -->
110    <h3>Texture combiners</h3>
111    <!-- #BeginLibraryItem "/Library/glossary_texture_conbiner.lbi" --> <!-- テクスチャコンバイナ ( texture_conbiner ) -->
112    <p>The <I>texture combiner</I> is the fragment shader process by which the results of the <I>vertex shader</I>, <I>fragment lighting</I> and <I>texel operations</I> serve as the input values that get blended to output the final color and alpha values. The input values used by the texture combiner are called <I>input sources</I>.</p>
113    <p>The figure below depicts the process flow from the input of the <I>fragment lighting result</I>, <I>texture color,</I> <I>vertex color </I>and <I>constant color </I> serving as input sources, to the result of blending by the texture combiner that will be passed to the blending process.</p>
114    <img class="user_guide_chart" src="assets/material_pipeline_textureconbiner.png" alt="Flow of the texture combiner"/> <!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/glossary_constant_color.lbi" -->
115    <p><I>Constant color</I> refers to the fixed color and alpha values that can be used for the combiner computational expressions of the texture combiner. Up to six Constant Colors can be set (constant 0 to constant 5), and one can be selected as the input source for each step in the texture combiner. You can also animate these using animation curves.</p>
116    <p class="warning">The Blend Color used in the Blend process is set separately.</p>
117    <!-- #EndLibraryItem -->
118    <h3>Fog</h3>
119    <!-- #BeginLibraryItem "/Library/glossary_fog.lbi" --> <!-- フォグ ( fog ) -->
120    <p><I>Fog</I> is the name of a feature that is used to represent atmospheric effects like mist and steam. This feature changes the color of objects based on their distance from the screen. The distance (aka &quot;depth value&quot;) is calculated on a per-fragment basis.<br /> Lookup tables can be used to determine the degree of attenuation over distance.</p>
121    <!-- #EndLibraryItem -->
122    <h3>Blender</h3>
123    <!-- #BeginLibraryItem "/Library/glossary_blender.lbi" --> <!-- ブレンダー ( blender ) -->
124    <p>The <I>Blender</I> performs a series of processes on the created fragment information, starting by loading information from the framebuffer and ending by writing data back to the framebuffer.</p>
125    <p>The blender decides whether to write a fragment to the framebuffer depending on the outcome of a <I>write test</I>. Fragments that pass the test are blended with any fragments already in the framebuffer in the same location, then <I>writes this back to the framebuffer</I>.</p>
126    <!-- #EndLibraryItem -->
127    <h4>Write Test</h4>
128    <!-- #BeginLibraryItem "/Library/glossary_write_test.lbi" --> <!-- 書き込みテスト ( write_test) -->
129    <p>The <I>write test</I> takes generated fragment information as a reference value and determines whether to actually write it to the framebuffer. This is carried out for each fragment. Specify the standard by which to judge fragments in CreativeStudio. Fragments that do not meet the standard are excluded from rendering.</p>
130    <p>The table below lists the conditions by which a fragment is judged during blending.</p>
131    <table>
132      <thead>
133        <tr>
134          <th>Conditions</th>
135          <th>Description</th>
136        </tr>
137      </thead>
138      <tbody>
139        <tr>
140          <th>Alpha test</th>
141          <td>An <I>alpha test</I> compares a fragment's alpha value with the reference value set for the alpha test.</td>
142        </tr>
143        <tr>
144          <th>Stencil test</th>
145          <td>A <I>stencil test</I> compares the value set for the fragment stencil test with the value in the <I>stencil buffer</I> to write to. If the fragment passes, the value in the stencil buffer is overwritten with the fragment value.</td>
146        </tr>
147        <tr>
148          <th>Depth test</th>
149          <td>A <I>depth test</I> compares the per-fragment <I>depth value</I> indicating the distance from the camera with the value in the <I>depth buffer</I> to write to. If the fragment passes, the value in the depth buffer is overwritten with the fragment value.</td>
150        </tr>
151      </tbody>
152    </table>
153    <p class="hint"><I>Write tests</I> are carried out in order of alpha test → depth test → stencil test.</p>
154    <!-- #EndLibraryItem -->
155    <h4>Write to Framebuffer</h4>
156    <!-- #BeginLibraryItem "/Library/glossary_write_frame_buffer.lbi" --> <!-- フレームバッファの書き込み ( write_frame_buffer ) -->
157    <p><em>Write to Framebuffer</em> is a process that blends the information for the fragments that will be used as determined by the <em>write test</em> with the information for fragments located at the same position in the <em>framebuffer</em>, and then writes the result of blending back to the framebuffer.</p>
158    <p>The table below lists blending methods when writing to the framebuffer.</p>
159    <table>
160      <thead>
161        <tr>
162          <th>Blending Types</th>
163          <th>Description</th>
164        </tr>
165      </thead>
166      <tbody>
167        <tr>
168          <th>Blending</th>
169          <td>Performs blending using a blend formula by multiplying the value set here times the color of the fragment to be newly written and the color in the framebuffer to be written and then writes the result to the framebuffer.</td>
170        </tr>
171        <tr>
172          <th>Logical Operations</th>
173          <td>Peforms logical operations on the color of the fragment to be newly written and the color in the framebuffer to be written and then writes the result to the framebuffer.</td>
174        </tr>
175      </tbody>
176    </table>
177    <!-- #EndLibraryItem -->
178    <p class="hint">The <em>fragment shader</em> process is complete upon writing to the framebuffer.</p>
179    <h3>Framebuffer</h3>
180    <!-- #BeginLibraryItem "/Library/glossary_frame_buffer.lbi" --> <!-- フレームバッファ ( frame_buffer ) -->
181    <p>The <I>framebuffer</I> is a memory region for temporarily storing data output from the fragment shader.<br /> Values for fragments for which processing by fragment using the blender has ended are stored here.</p>
182    <p>The table below gives an overview of the three <I>buffers</I> that collectively make up the framebuffer.</p>
183    <table>
184      <thead>
185        <tr>
186          <th>Buffer Type</th>
187          <th>Usage</th>
188        </tr>
189      </thead>
190      <tbody>
191        <tr>
192          <th>Color Buffer</th>
193          <td>Renders fragment values that contain color and alpha values.</td>
194        </tr>
195        <tr>
196          <th>Stencil Buffer</th>
197          <td>Stores information that limits the area being rendered. This is used during stencil tests.</td>
198        </tr>
199        <tr>
200          <th>Depth Buffer</th>
201          <td>Stores information about the depth from the camera. This is used during depth tests.</td>
202        </tr>
203      </tbody>
204    </table>
205    <!-- #EndLibraryItem -->
206    <p class="warning">The fragment value in the <em>framebuffer</em> is used by the <em>blender</em> process of  CreativeStudio.</p>
207    <!-- InstanceEndEditable --> </div>
208  <div class="footer" />
209</div>
210<hr><p>CONFIDENTIAL</p></body>
211<!-- InstanceEnd -->
212</html>
213