1<html>
2<head>
3<title>Defining Cameras</title>
4<link rel="stylesheet" href="../css/mainpage.css" type="text/css">
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6</head>
7
8<body>
9
10<h1>Defining Lights</h1>
11
12<h2>Overview</h2>
13<p>
14Light data are defined in <CODE>&lt;FragmentLightCtr&gt;</CODE> below <CODE>&lt;Lights&gt;</CODE>. Where there are multiple sets of light data, there are multiple <CODE>&lt;FragmentLightCtr&gt;</CODE> tags below the <CODE>&lt;Lights&gt;</CODE> tag. <CODE>&lt;FragmentLightCtr&gt;</CODE> contains the following light-related information:
15</p>
16
17<h2>Light Type</h2>
18<p>
19There are three light  types, as listed below. The light type is specified by the  <CODE>LightKind</CODE> attribute of the <CODE>&lt;FragmentLightCtr&gt;</CODE> tag.
20</p>
21
22<ul>
23<li>Directional Light</li>
24<p>When <CODE>DirectionalLight</CODE> is specified for the <CODE>LightKind</CODE> attribute, the light type is a directional light.</p>
25
26<li>Point Light</li>
27<p>When <CODE>PointLight</CODE> is specified for the <CODE>LightKind </CODE>attribute, the light type is a point light.</p>
28
29<li>Spot Light</li>
30<p>When <CODE>SpotLight</CODE> is specified for the <CODE>LightKind </CODE>attribute, the light type is a spot light.</p>
31</ul>
32
33<h2>Light SRT Information</h2>
34<p>
35This stores information about the light's position, rotation and scaling.
36</p>
37
38<table>
39<tr><td>
40<pre>
41&lt;NintendoWareIntermediateFile&gt;<br>
42  &lt;GraphicsContentCtr&gt;<br>
43    &lt;Lights&gt;<br>
44      &lt;FragmentLightCtr&gt;<br>
45        &lt;Transform&gt;<br>
46</pre>
47</td></tr>
48</table>
49
50<h2>Light Color Information</h2>
51<p>
52The four following parameters are stored as the light color information. These color parameters are used for all the types of lights.
53</p>
54
55<ul>
56<li>Ambient color</li>
57<table>
58<tr><td>
59<pre>
60&lt;NintendoWareIntermediateFile&gt;<br>
61  &lt;GraphicsContentCtr&gt;<br>
62    &lt;Lights&gt;<br>
63      &lt;FragmentLightCtr&gt;<br>
64        &lt;Ambient&gt;<br>
65</pre>
66</td></tr>
67</table>
68<li>Diffuse Color</li>
69<table>
70<tr><td>
71<pre>
72&lt;NintendoWareIntermediateFile&gt;<br>
73  &lt;GraphicsContentCtr&gt;<br>
74    &lt;Lights&gt;<br>
75      &lt;FragmentLightCtr&gt;<br>
76        &lt;Diffuse&gt;<br>
77</pre>
78</td></tr>
79</table>
80<li>Specular Color 0</li>
81<table>
82<tr><td>
83<pre>
84&lt;NintendoWareIntermediateFile&gt;<br>
85  &lt;GraphicsContentCtr&gt;<br>
86    &lt;Lights&gt;<br>
87      &lt;FragmentLightCtr&gt;<br>
88        &lt;Specular0&gt;<br>
89</pre>
90</td></tr>
91</table>
92<li>Specular Color 1</li>
93<table>
94<tr><td>
95<pre>
96&lt;NintendoWareIntermediateFile&gt;<br>
97  &lt;GraphicsContentCtr&gt;<br>
98    &lt;Lights&gt;<br>
99      &lt;FragmentLightCtr&gt;<br>
100        &lt;Specular1&gt;<br>
101</pre>
102</td></tr>
103</table>
104</ul>
105
106<h2>Light direction</h2>
107<p>
108The direction that the light is pointing is specified by a vector. This parameter is configured when specifying the direction of a directional light or a spot light.
109</p>
110
111<table>
112<tr><td>
113<pre>
114&lt;NintendoWareIntermediateFile&gt;<br>
115  &lt;GraphicsContentCtr&gt;<br>
116    &lt;Lights&gt;<br>
117      &lt;FragmentLightCtr&gt;<br>
118        &lt;Direction&gt;<br>
119</pre>
120</td></tr>
121</table>
122
123<h2>Attenuation Inside Spotlight Cone</h2>
124<p>
125This is the setting for the attenuation inside the spotlight cone. This specifies a table used with the <CODE>&lt;ReferenceLookupTableCtr&gt;</CODE> tag. This table is defined as a lookup table of cosine values of the angle formed from the light vector and the spot-direction vector.
126</p>
127
128<table>
129<tr><td>
130<pre>
131&lt;NintendoWareIntermediateFile&gt;<br>
132  &lt;GraphicsContentCtr&gt;<br>
133    &lt;Lights&gt;<br>
134      &lt;FragmentLightCtr&gt;<br>
135        &lt;AngleSampler&gt;<br>
136          &lt;ReferenceLookupTableCtr&gt;<br>
137            &lt;LookupTableSetContentReferenceCtr&gt;<br>
138</pre>
139</td></tr>
140</table>
141
142<hr><p>CONFIDENTIAL</p></body>
143</html>
144