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"><!-- InstanceBegin template="/Templates/default_template.dwt" codeOutsideHTMLIsLocked="false" --> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5<meta http-equiv="Content-Style-Type" content="text/css" /> 6<!-- InstanceBeginEditable name="CSS の相対パス指定" --> 7<link href="../../../common/manual.css" rel="stylesheet" type="text/css" /> 8<!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="ページのタイトル" --> 9<title>Texture combiners</title> 10<!-- InstanceEndEditable --> 11</head> 12<body> 13<div> 14 <div class="body"> <!-- InstanceBeginEditable name="本文のタイトル" --> 15 <h1>Texture combiners</h1> 16 <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="本文" --> 17 <p>This section describes texture combiners.</p> 18 <h2>Texture Combiner and Process Flow</h2> 19 <p>This document describes the process flow of the texture combiner.</p><!-- #BeginLibraryItem "/Library/glossary_texture_conbiner.lbi" --> <!-- テクスチャコンバイナ ( texture_conbiner ) --> 20 <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> 21<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> 22 <img class="user_guide_chart" src="../material_pipeline/assets/material_pipeline_textureconbiner.png" alt="Process flow of the texture combiner"/> <!-- #EndLibraryItem --><h2>Texture Combiner Structure</h2> 23 <p>This section describes the texture combiner structure based on each element making up the texture combiner.</p> 24 <p>The following figure represents a conceptual image of the texture combiner structure.</p> 25 <img class="user_guide_chart" src="assets/combiner_composition.png" alt="Texture Combiner Configuration"/> 26 <h3>Texture Combiner's Number of Steps</h3> 27 <!-- #BeginLibraryItem "/Library/glossary_combiner_stage.lbi" --> <!-- テクスチャコンバイナの段数 ( combiner_stage ) --> 28 <p>The<I> texture combiner's number of steps</I> refers to the number of times computations are performed to blend the input source. The texture combiner always uses up to six steps. </p> 29 <!-- #EndLibraryItem --> 30 <h3>Constant color</h3><!-- #BeginLibraryItem "/Library/glossary_constant_color.lbi" --> <!-- コンスタントカラー ( constant_color ) --> 31 <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> 32 <p class="warning">The Blend Color used in the Blend process is set separately.</p> 33 <!-- #EndLibraryItem --><h3>Texture Combiner's Buffer</h3><!-- #BeginLibraryItem "/Library/glossary_buffer.lbi" --> <!-- バッファ ( buffer ) --> 34<p>A <I>buffer </I>is a memory region where information can be temporarily stored and retrieved while processing is taking place.</p> 35<p>Since different kinds of information are handled by different buffers, the buffers are named to reflect which kind of information they handle.</p> 36<!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/glossary_combiner_buffer.lbi" --> <!-- テクスチャコンバイナのバッファ( combiner_buffer ) --> 37 <p>The <I>texture combiner buffer</I> is the memory region for temporary storage of the value output from each step by the texture combiner. Values output from steps that use the buffer can be used as input sources for subsequent steps.<br /> The buffer cannot be used for the last step by the texture combiner.</p> 38 <!-- #EndLibraryItem --> 39 <h2>Texture Combiner Settings</h2> 40 <p>This section describes settings of the texture combiner.</p> 41 <h3>Input Sources</h3> 42 <p>The texture combiner uses three input sources when performing blending.</p> 43 <p>The table below lists ten types of input sources used by the texture combiner.</p> 44 <table> 45 <thead> 46 <tr> 47 <th>Source Types</th> 48 <th>Description</th> 49 </tr> 50 </thead> 51 <tbody> 52 <tr> 53 <th>Texture 0</th> 54 <td>The color and alpha of the texture image set for Texture 0.</td> 55 </tr> 56 <tr> 57 <th>Texture 1</th> 58 <td>The color and alpha of the texture image set for Texture 1.</td> 59 </tr> 60 <tr> 61 <th>Texture 2</th> 62 <td>The color and alpha of the texture image set for Texture 2.</td> 63 </tr> 64 <tr> 65 <th>Texture 3</th> 66 <td>The color and alpha of the texture image set for Texture 3.</td> 67 </tr> 68 <tr> 69 <th>Constant color</th> 70 <td>The color or alpha that can be set as selected for each step of the texture combiner.</td> 71 </tr> 72 <tr> 73 <th>Result output by vertex shader</th> 74 <td>The color or alpha output from the vertex shader.</td> 75 </tr> 76 <tr> 77 <th>Result output by previous stage</th> 78 <td>The color or alpha output from the previous step. This cannot be used in the first step.</td> 79 </tr> 80 <tr> 81 <th>Buffer from previous stage</th> 82 <td>The color or alpha output to the buffer from the previous step. This cannot be used in the first step.</td> 83 </tr> 84 <tr> 85 <th>Primary color</th> 86 <td>The output result of fragment lighting.</td> 87 </tr> 88 <tr> 89 <th>Secondary color</th> 90 <td>The output result of fragment lighting.</td> 91 </tr> 92 </tbody> 93 </table> 94 <p class="warning">Of the input sources used in Step 2 and beyond, at least one must be specified as <em>Constant color</em>, <em>Result output by previous stage</em>, or <em>Buffer from previous stage</em>.</p> 95 <h3>Operands</h3> 96 <!-- #BeginLibraryItem "/Library/glossary_combiner_operand.lbi" --> <!-- オペランド ( combiner_operand ) --> 97 <p><em>Operands</em> are a feature of the texture combiner used to specify the components for the blend of RGBA input sources from the various channels. In the default setting, RGB is applied to the color and A to the alpha.</p> 98 <!-- #EndLibraryItem --> 99 <p>This is a description of the operand using the texture image below.</p> 100 <table class="thumb"> 101 <thead> 102 <tr> 103 <th>Color channel.</th> 104 <th>Alpha Channel</th> 105 </tr> 106 </thead> 107 <tbody> 108 <tr> 109 <td><img class="thumb" src="assets//combiner_a.png" alt="Combiner A"/></td> 110 <td><img class="thumb" src="assets//combiner_operand_alpha.png" alt="Alpha Channel"/></td> 111 </tr> 112 </tbody> 113 </table> 114 <h4>Operands for the color in the texture combiner</h4> 115 <p>The table below lists the types of operands that can be selected for the color of the texture combiner.</p> 116 <table> 117 <thead> 118 <tr> 119 <th class="thumb">Item</th> 120 <th class="thumb">Result</th> 121 <th>Description</th> 122 </tr> 123 </thead> 124 <tbody> 125 <tr> 126 <th class="thumb">RGB</th> 127 <td class="thumb"><img class="thumb" src="assets/combiner_a.png" alt="Combiner A"/></td> 128 <td>Applies the color channel to the R, G or B channel.</td> 129 </tr> 130 <tr> 131 <th class="thumb">1 - RGB</th> 132 <td class="thumb"><img class="thumb" src="assets/combiner_operand_1_sub_rgb.png" alt="Operand 1 - RGB"/></td> 133 <td>Inverts the color channel and applies it to the R, G or B channel.</td> 134 </tr> 135 <tr> 136 <th class="thumb">A</th> 137 <td class="thumb"><img class="thumb" src="assets//combiner_operand_alpha.png" alt="Alpha Channel"/></td> 138 <td>Applies the alpha channel to the R, G or B channel.</td> 139 </tr> 140 <tr> 141 <th class="thumb">1 - A</th> 142 <td class="thumb"><img class="thumb" src="assets/combiner_operand_1_sub_alpha.png" alt="Operand 1 - A"/></td> 143 <td>Inverts the alpha channel and applies it to the R, G or B channel.</td> 144 </tr> 145 <tr> 146 <th class="thumb">R</th> 147 <td class="thumb"><img class="thumb" src="assets/combiner_operand_r.png" alt="Operand 1R"/></td> 148 <td>Applies the R channel to the R, G or B channel.</td> 149 </tr> 150 <tr> 151 <th class="thumb"><CODE>G</CODE></th> 152 <td class="thumb"><img class="thumb" src="assets/combiner_operand_g.png" alt="Operand 1G"/></td> 153 <td>Applies the G channel to the R, G or B channel.</td> 154 </tr> 155 <tr> 156 <th class="thumb">B</th> 157 <td class="thumb"><img class="thumb" src="assets/combiner_operand_b.png" alt="Operand B"/></td> 158 <td>Applies the B channel to the R, G or B channel.</td> 159 </tr> 160 <tr> 161 <th class="thumb">1 - R</th> 162 <td class="thumb"><img class="thumb" src="assets/combiner_operand_1_sub_r.png" alt="Operand 1-R"/></td> 163 <td>Applies the color B channel to the R, G or B channel.</td> 164 </tr> 165 <tr> 166 <th class="thumb">1 - G</th> 167 <td class="thumb"><img class="thumb" src="assets/combiner_operand_1_sub_g.png" alt="Operand 1-G"/></td> 168 <td>Applies the color G channel to the R, G or B channel.</td> 169 </tr> 170 <tr> 171 <th class="thumb">1 - B</th> 172 <td class="thumb"><img class="thumb" src="assets/combiner_operand_1_sub_b.png" alt="Operand 1-B"/></td> 173 <td>Applies the color B channel to the R, G or B channel.</td> 174 </tr> 175 </tbody> 176 </table> 177 <h4>Operands for the alpha in the texture combiner</h4> 178 <p>The table below lists the types of operands that can be selected for the color of the texture combiner.</p> 179 <table> 180 <thead> 181 <tr> 182 <th class="thumb">Item</th> 183 <th class="thumb">Result</th> 184 <th>Description</th> 185 </tr> 186 </thead> 187 <tbody> 188 <tr> 189 <th class="thumb">A</th> 190 <td class="thumb"><img class="thumb" src="assets//combiner_operand_alpha.png" alt="Alpha Channel"/></td> 191 <td>Applies the alpha channel to the A channel</td> 192 </tr> 193 <tr> 194 <th class="thumb">1 - A</th> 195 <td class="thumb"><img class="thumb" src="assets/combiner_operand_1_sub_alpha.png" alt="Operand 1 - A"/></td> 196 <td>Inverts the alpha channel and applies it to the R, G or B channel.</td> 197 </tr> 198 <tr> 199 <th class="thumb">R</th> 200 <td class="thumb"><img class="thumb" src="assets/combiner_operand_r.png" alt="Operand 1R"/></td> 201 <td>Applies the color R channel to the A channel.</td> 202 </tr> 203 <tr> 204 <th class="thumb"><CODE>G</CODE></th> 205 <td class="thumb"><img class="thumb" src="assets/combiner_operand_g.png" alt="Operand 1G"/></td> 206 <td>Applies the color G channel to the A channel.</td> 207 </tr> 208 <tr> 209 <th class="thumb">B</th> 210 <td class="thumb"><img class="thumb" src="assets/combiner_operand_b.png" alt="Operand B"/></td> 211 <td>Applies the color B channel to the A channel.</td> 212 </tr> 213 <tr> 214 <th class="thumb">1 - R</th> 215 <td class="thumb"><img class="thumb" src="assets/combiner_operand_1_sub_r.png" alt="Operand 1-R"/></td> 216 <td>Inverts the color B channel and applies it to the A channel.</td> 217 </tr> 218 <tr> 219 <th class="thumb">1 - G</th> 220 <td class="thumb"><img class="thumb" src="assets/combiner_operand_1_sub_g.png" alt="Operand 1-G"/></td> 221 <td>Inverts the color G channel and applies it to the A channel.</td> 222 </tr> 223 <tr> 224 <th class="thumb">1 - B</th> 225 <td class="thumb"><img class="thumb" src="assets/combiner_operand_1_sub_b.png" alt="Operand 1-B"/></td> 226 <td>Inverts the color B channel and applies it to the A channel.</td> 227 </tr> 228 </tbody> 229 </table> 230 <h3>Texture Combiner's Computation Expressions</h3> 231 <!-- #BeginLibraryItem "/Library/glossary_combiner_function.lbi" --> <!-- テクスチャコンバイナの計算式 ( combiner_function ) --> 232 <p><I>Texture Combiner Computational Expressions</I> are the expressions used for blending the color and alpha components as determined by the input source operand settings. The color and alpha can each be selected from among 10 different expressions.</p> 233 <!-- #EndLibraryItem --> 234 <p>The following texture images, A, B and C, represent the results for input sources 0, 1 and 2 after application of the operand.<br /> The description of the blending performed using the texture combiner function is based on this image.</p> 235 <table class="thumb"> 236 <thead> 237 <tr> 238 <th>A</th> 239 <th>B</th> 240 <th>C</th> 241 </tr> 242 </thead> 243 <tbody> 244 <tr> 245 <td><img class="thumb" src="assets//combiner_a.png" alt="Combiner A"/></td> 246 <td><img class="thumb" src="assets//combiner_b.png" alt="Combiner B"/></td> 247 <td><img class="thumb" src="assets//combiner_c.png" alt="Combiner C"/></td> 248 </tr> 249 </tbody> 250 </table> 251 <p>The table below lists the texture combiner functions that can be selected when using CreativeStudio.</p> 252 <table> 253 <thead> 254 <tr> 255 <th class="thumb">Item</th> 256 <th class="thumb">Function Name</th> 257 <th class="thumb">Result</th> 258 <th>Description</th> 259 </tr> 260 </thead> 261 <tbody> 262 <tr> 263 <th class="thumb">A</th> 264 <th class="thumb">REPLACE</th> 265 <td class="thumb"><img class="thumb" src="assets/combiner_a.png" alt="Combiner A"/></td> 266 <td>Outputs A as-is.</td> 267 </tr> 268 <tr> 269 <th class="thumb">A × B</th> 270 <th class="thumb">MODULATE</th> 271 <td class="thumb"><img class="thumb" src="assets/combiner_modulate.png" alt="MODULATE"/></td> 272 <td>Multiplies A and B.</td> 273 </tr> 274 <tr> 275 <th class="thumb">A + B</th> 276 <th class="thumb">ADD</th> 277 <td class="thumb"><img class="thumb" src="assets/combiner_add.png" alt="ADD"/></td> 278 <td>Adds A and B.</td> 279 </tr> 280 <tr> 281 <th class="thumb">A + B - 0.5</th> 282 <th class="thumb">ADD_SIGNED</th> 283 <td class="thumb"><img class="thumb" src="assets/combiner_add_signed.png" alt="ADD_SIGNED"/></td> 284 <td>Adds A and B and subtracts 0.5.</td> 285 </tr> 286 <tr> 287 <th class="thumb">A × C + B × ( 1 - C )</th> 288 <th class="thumb">INTERPOLATE</th> 289 <td class="thumb"><img class="thumb" src="assets/combiner_interpolate.png" alt="INTERPOLATEA"/></td> 290 <td>Blends A and B in the proportion given by C.<br /> For example, a change from A to B can be made smoothly by animating the color of C.</td> 291 </tr> 292 <tr> 293 <th class="thumb">A - B</th> 294 <th class="thumb">SUBTRACT</th> 295 <td class="thumb"><img class="thumb" src="assets/combiner_subtract.png" alt="SUBTRACT"/></td> 296 <td>Subtracts B from A.</td> 297 </tr> 298 <tr> 299 <th class="thumb">RGB ← Dot ( A , B )</th> 300 <th class="thumb">DOT3_RGB</th> 301 <td class="thumb"><img class="thumb" src="assets/combiner_dot3_rgb.png" alt="DOT3_RGB"/></td> 302 <td>By treating the RGB values of A and B as vectors, this algorithm is used to blend color channels separately when a normal mapped texture is specified for the type of resource. The output result is gray because the same value is inserted for each channel component.</td> 303 </tr> 304 <tr> 305 <th class="thumb">RGBA ← Dot ( A , B )</th> 306 <th class="thumb">DOT3_RGBA</th> 307 <td class="thumb"><img class="thumb" src="assets/combiner_dot3_rgb.png" alt="DOT3_RGB"/></td> 308 <td>Although the same function is used as with RGB ← Dot ( A , B ), the same value as used for color components is inserted for the alpha component.<br /> <strong>CreativeStudio settings must specify RGBA←Dot ( A , B ) for both color and alpha input sources.</strong></td> 309 </tr> 310 <tr> 311 <th class="thumb">( A + B ) × C </th> 312 <th class="thumb">ADD_MULT</th> 313 <td class="thumb"><img class="thumb" src="assets/combiner_add_mult.png" alt="ADD_MULT"/></td> 314 <td>Adds A and B and then multiplies by C.<br /> <strong>During computation, the value resulting when A and B are added does not go above 1.0.</strong></td> 315 </tr> 316 <tr> 317 <th class="thumb">( A × B ) + C </th> 318 <th class="thumb">MULT_ADD</th> 319 <td class="thumb"><img class="thumb" src="assets/combiner_mult_add.png" alt="MULT_ADD"/></td> 320 <td>Multiplies A and B and then adds C.</td> 321 </tr> 322 </tbody> 323 </table> 324 <p>Both of the functions <em>RGB ← Dot ( A , B )</em> and <em>RGBA ← Dot ( A , B )</em> take into account the fact that values will be converted to the range -1 to 1 when vectors are computed during the texel generation process for texture images stored in texture memory in the range 0 to 1. This function works as follows.</P> 325<p class="system">4 × ((Ar – 0.5) × (Br – 0.5) + (Ag – 0.5) × (Bg – 0.5) + (Ab – 0.5) × (Bb – 0.5))</p> 326 <!-- #BeginLibraryItem "/Library/glossary_vector.lbi" --> <!-- ベクトル ( vector ) --> 327 <p>Having both <em>magnitude</em> and <em>direction</em>, vectors are represented by arrow length and direction. With CreativeStudio, vectors are used in many different situations such as light calculations and particle speed control. They are also used when converting the color components of a texture image into X, Y and Z vector values.</p> 328 <!-- #EndLibraryItem --> 329 <h4>Scaling calculation results</h4> 330 <p>Texture combiner calculation results can be multipled by a scale setting. A scale can be set for each color and alpha being blended. There are three scale settings to select from: x1, x2 and x4.</p> 331 <!-- InstanceEndEditable --> </div> 332 <div class="footer" /> 333</div> 334<hr><p>CONFIDENTIAL</p></body> 335<!-- InstanceEnd --></html> 336