<?xml version="1.0" encoding="utf-8"?>
<m3danim length="10">
  <video-clips>
    <random-movie-clip-playlist name="clips0" only-from="movie0" length="10" clip-length="3.33"/>
    <random-movie-clip-playlist name="clips1" only-from="movie1" length="10" clip-length="3.33"/>
    <random-movie-clip-playlist name="clips2" only-from="movie2" length="10" clip-length="3.33"/>    
    <!--video-clip name="movie0" src="movie0" length="10"/>
	  <video-clip name="movie1" src="movie1" length="10"/>	
	  <video-clip name="movie2" src="movie2" length="10"/-->
  </video-clips>
  <render-targets>
    <render-target texture="text" size="1024"/>
    <render-target texture="label_movie0" size="256"/>
    <render-target texture="label_movie1" size="256"/>
    <render-target texture="label_movie2" size="256"/>
  </render-targets>
  
  <viewports>
    <viewport name="menu" world="menu">
      <projection-transform>
        <menu-screen/>
      </projection-transform>
    </viewport>
    <viewport name="text" world="text">
      <projection-transform>
        <orthogonal/>
      </projection-transform>
    </viewport>

    <viewport name="label_movie0" world="label_movie0">
      <projection-transform>
        <orthogonal/>
      </projection-transform>
    </viewport>
    <viewport name="label_movie1" world="label_movie1">
      <projection-transform>
        <orthogonal/>
      </projection-transform>
    </viewport>
    <viewport name="label_movie2" world="label_movie2">
      <projection-transform>
        <orthogonal/>
      </projection-transform>
    </viewport>
    
  </viewports>
  
	<worlds>

		<world name="text">
			<container>
        <text text-id="disc.title" font-weight="bold" font-name="Arial Bold" font-size="70" align="center" valign="center" font-color="#FF18579E">
					My first self-encoded DVD!
				</text>
				<transforms>
					<scale x="1" y="1" />
					<!--translate y="-1.0"/-->
				</transforms>
			</container>
		</world>

    <world name="label_movie0">
      <container>
        <text text-id="button.movie0" font-weight="bold" font-name="Arial Bold" font-size="30" align="center" valign="top" font-color="#FF8EC5EB">
        </text>
        <transforms>
          <scale x="1" y="1" />
          <translate y="-1" />
        </transforms>
      </container>
    </world>

    <world name="label_movie1">
      <container>
        <text text-id="button.movie1" font-weight="bold" font-name="Arial Bold" font-size="30" align="center" valign="top" font-color="#FF8EC5EB">
        </text>
        <transforms>
          <scale x="1" y="1" />
          <translate y="-1" />
        </transforms>
      </container>
    </world>

    <world name="label_movie2">
      <container>
        <text text-id="button.movie2" font-weight="bold" font-name="Arial Bold" font-size="30" align="center" valign="top" font-color="#FF8EC5EB">
        </text>
        <transforms>
          <scale x="1" y="1" />
          <translate y="-1" />
        </transforms>
      </container>
    </world>


		<world name="menu">
			<trianglestrip>
				<xyz>
					1.3203125	-0.1	1.0
					-0.3203125	-0.1	1.0
					1.3203125	1.1		1.0
					-0.3203125	1.1 	1.0
				</xyz>
        <texcoord absolute="false">
          1.0   	0
          0		0
          1.0   	1.0
          0	    1.0
        </texcoord>
        <texture static-src="background0.png"/>

        <texcoord absolute="false">
          1.0   	0
          0		0
          1.0   	1.0
          0	    1.0
        </texcoord>
        <texture static-src="background1.png"/>

        <texcoord absolute="false">
          1.0   	0
          0		0
          1.0   	1.0
          0	    1.0
        </texcoord>
        <texture static-src="background2.png"/>

        <texcoord />
        <texture  perlin-static="noise_bg"
                  fields-horz="4"
                  fields-vert="4"
                  field-width="32"
                  field-height="32"
                  blur-radius="6"/>
        <shader pixelshader="waterbg" vertexshader="../common/id">
          <float name="octaves" value="8"/>
          <float name="freq" value="4"/>
          <float name="fieldsize" value="32"/>
          <float name="fieldshorz" value="4"/>
          <float name="fieldsvert" value="4"/>
          <float name="amplitude" value="0.001"/>
          <float name="looptime" value="10"/>
        </shader>
        <transforms>

        </transforms>
      </trianglestrip>

      <!-- Title -->
      <container>
        <trianglestrip>
          <xyz>
            1.3		1.0	1.0
            -0.3	1.0	1.0
            1.3		0.0 1.0
            -0.3	0.0	1.0
          </xyz>
          <texcoord>
            1.0   0.451171875
            0.0   0.451171875
            1.0   0.548828125
            0.0   0.548828125
          </texcoord>
          <texture render-target="text"/>

          <texcoord />
          <texture  perlin-static="noise_text"
                    fields-horz="4"
                    fields-vert="4"
                    field-width="32"
                    field-height="32"
                    blur-radius="7" />
          <shader pixelshader="water" vertexshader="../common/id">
            <float name="octaves" value="8"/>
            <float name="freq" value="2"/>
            <float name="fieldsize" value="32"/>
            <float name="fieldshorz" value="4"/>
            <float name="fieldsvert" value="4"/>
            <float name="amplitude" value="0.003"/>
            <float name="looptime" value="10"/>
            <float name="opacityadd" value="0"/>
            <float name="borderfadeout" value="0"/>
          </shader>


          <transforms>
            <!--translate y="0.6"/-->
            <scale y="0.15625"/>
          </transforms>
        </trianglestrip>

      </container>


      <container>
        <transforms>
          <translate x="0.5" y="0.47"/>
        </transforms>


        <if video-clip="clips0">
          <container>
            <transforms>
              <translate x="-0.3"/>
              <scale x="0.8" y="0.8"/>
            </transforms>

            <trianglestrip>
              <xyz>
                0.16328125		-0.21770833333	0.0
                -0.16328125		-0.21770833333	0.0
                0.16328125		0.21770833333	0.0
                -0.16328125		0.21770833333	0.0
              </xyz>
              <texcoord>
                1.0   0.0
                0.0   0.0
                1.0   1.0
                0.0   1.0
              </texcoord>
              <texture video-clip="clips0"/>

              <texcoord />
              <texture  perlin-static="noise_videos"
                        fields-horz="8"
                        fields-vert="8"
                        field-width="32"
                        field-height="32"
                        blur-radius="3" />
              <shader pixelshader="water" vertexshader="../common/id">
                <float name="octaves" value="8"/>
                <float name="freq" value="4"/>
                <float name="fieldsize" value="32"/>
                <float name="fieldshorz" value="8"/>
                <float name="fieldsvert" value="8"/>
                <float name="amplitude" value="0.01"/>
                <float name="looptime" value="10"/>
                <float name="opacityadd" value="-0.4"/>
                <float name="borderfadeout" value="0.4"/>
              </shader>
              
              
							<transforms>
								
							</transforms>					
						</trianglestrip>


            <trianglestrip>
              <xyz>
                0.2		-0.2666666666	0.0
                -0.2	-0.2666666666	0.0
                0.2		0.2666666666	0.0
                -0.2	0.2666666666	0.0
              </xyz>
              <texcoord>
                1.0   0.0
                0.0   0.0
                1.0   1.0
                0.0   1.0
              </texcoord>
              <texture render-target="label_movie0"/>

              <texcoord />
              <texture  perlin-static="noise_labels"
                        fields-horz="4"
                        fields-vert="4"
                        field-width="16"
                        field-height="16"
                        blur-radius="3" />
              <shader pixelshader="water" vertexshader="../common/id">
                <float name="octaves" value="8"/>
                <float name="freq" value="4"/>
                <float name="fieldsize" value="16"/>
                <float name="fieldshorz" value="4"/>
                <float name="fieldsvert" value="4"/>
                <float name="amplitude" value="0.005"/>
                <float name="looptime" value="10"/>
                <float name="opacityadd" value="-0.2"/>
                <float name="borderfadeout" value="0"/>
              </shader>
              
              
              
              <transforms>
                <translate y="0.49" />
                <scale y="-0.9" x="0.9" />
              </transforms>
            </trianglestrip>

								
					</container>
				</if>
				
				<if video-clip="clips1">
					<container>
						<transforms>
							<translate x="-0.0"/>
							<scale x="0.8" y="0.8"/>
						</transforms>

						<trianglestrip>
							<xyz>
								0.16328125		-0.21770833333	0.0
								-0.16328125		-0.21770833333	0.0
								0.16328125		0.21770833333	0.0
								-0.16328125		0.21770833333	0.0
							</xyz>
							<texcoord>
								1.0   0.0
								0.0   0.0
								1.0   1.0
								0.0   1.0
							</texcoord>
							<texture video-clip="clips1"/>

              <texcoord />
              <texture  perlin-static="noise_videos"
                        fields-horz="8"
                        fields-vert="8"
                        field-width="32"
                        field-height="32"
                        blur-radius="3" />
              <shader pixelshader="water" vertexshader="../common/id">
                <float name="octaves" value="8"/>
                <float name="freq" value="4"/>
                <float name="fieldsize" value="32"/>
                <float name="fieldshorz" value="8"/>
                <float name="fieldsvert" value="8"/>
                <float name="amplitude" value="0.01"/>
                <float name="looptime" value="10"/>
                <float name="opacityadd" value="-0.4"/>
                <float name="borderfadeout" value="0.4"/>
              </shader>

              <transforms>

              </transforms>
            </trianglestrip>

            <trianglestrip>
              <xyz>
                0.2		-0.2666666666	0.0
                -0.2	-0.2666666666	0.0
                0.2		0.2666666666	0.0
                -0.2	0.2666666666	0.0
              </xyz>
              <texcoord>
                1.0   0.0
                0.0   0.0
                1.0   1.0
                0.0   1.0
              </texcoord>
              <texture render-target="label_movie1"/>

              <texcoord />
              <texture  perlin-static="noise_labels"
                        fields-horz="4"
                        fields-vert="4"
                        field-width="16"
                        field-height="16"
                        blur-radius="3" />
              <shader pixelshader="water" vertexshader="../common/id">
                <float name="octaves" value="8"/>
                <float name="freq" value="4"/>
                <float name="fieldsize" value="16"/>
                <float name="fieldshorz" value="4"/>
                <float name="fieldsvert" value="4"/>
                <float name="amplitude" value="0.005"/>
                <float name="looptime" value="10"/>
                <float name="opacityadd" value="-0.2"/>
                <float name="borderfadeout" value="0"/>
              </shader>
              
              
              <transforms>
                <translate y="0.49" />
                <scale y="-0.9" x="0.9" />
              </transforms>
              
            </trianglestrip>


          </container>
        </if>

        <if video-clip="clips2">
          <container>
            <transforms>
              <translate x="0.3"/>
              <scale x="0.8" y="0.8"/>
            </transforms>

            <trianglestrip>
              <xyz>
                0.16328125		-0.21770833333	0.0
                -0.16328125		-0.21770833333	0.0
                0.16328125		0.21770833333	0.0
                -0.16328125		0.21770833333	0.0
              </xyz>
              <texcoord>
                1.0   0.0
                0.0   0.0
                1.0   1.0
                0.0   1.0
              </texcoord>
              <texture video-clip="clips2"/>

              <texcoord />
              <texture  perlin-static="noise_videos"
                        fields-horz="8"
                        fields-vert="8"
                        field-width="32"
                        field-height="32"
                        blur-radius="3" />
              <shader pixelshader="water" vertexshader="../common/id">
                <float name="octaves" value="8"/>
                <float name="freq" value="4"/>
                <float name="fieldsize" value="32"/>
                <float name="fieldshorz" value="8"/>
                <float name="fieldsvert" value="8"/>
                <float name="amplitude" value="0.01"/>
                <float name="looptime" value="10"/>
                <float name="opacityadd" value="-0.4"/>
                <float name="borderfadeout" value="0.4"/>
              </shader>
              
							<transforms>
								
							</transforms>					
						</trianglestrip>

            <trianglestrip>
              <xyz>
                0.2		-0.2666666666	0.0
                -0.2	-0.2666666666	0.0
                0.2		0.2666666666	0.0
                -0.2	0.2666666666	0.0
              </xyz>
              <texcoord>
                1.0   0.0
                0.0   0.0
                1.0   1.0
                0.0   1.0
              </texcoord>
              <texture render-target="label_movie2"/>

              <texcoord />
              <texture  perlin-static="noise_labels"
                        fields-horz="4"
                        fields-vert="4"
                        field-width="16"
                        field-height="16"
                        blur-radius="3" />
              <shader pixelshader="water" vertexshader="../common/id">
                <float name="octaves" value="8"/>
                <float name="freq" value="4"/>
                <float name="fieldsize" value="16"/>
                <float name="fieldshorz" value="4"/>
                <float name="fieldsvert" value="4"/>
                <float name="amplitude" value="0.005"/>
                <float name="looptime" value="10"/>
                <float name="opacityadd" value="-0.2"/>
                <float name="borderfadeout" value="0"/>
              </shader>
              
              
              <transforms>
                <translate y="0.49" />
                <scale y="-0.9" x="0.9" />
              </transforms>
            </trianglestrip>
								
					</container>
				</if>			
			</container>
			
			<container>
				<transforms>
					<translate x="0.5" y="0.85"/>
				</transforms>
				<if bool="prevpage">
					<trianglestrip>
						<xyz>
							0.1		-0.13333333	0.0
							-0.1	-0.13333333	0.0
							0.1		0.13333333	0.0
							-0.1	0.13333333	0.0
						</xyz>
						<texcoord>
							1.0   0.0
							0.0   0.0
							1.0   1.0
							0.0   1.0
						</texcoord>
						<texture static-src="button_prev.png"/>
						<transforms>
							<translate x="-0.25"/>
						</transforms>					
					</trianglestrip>			
				</if>
				
				<if bool="pageup">
					<trianglestrip>
						<xyz>
							0.1		-0.13333333	0.0
							-0.1	-0.13333333	0.0
							0.1		0.13333333	0.0
							-0.1	0.13333333	0.0
						</xyz>
						<texcoord>
							1.0   0.0
							0.0   0.0
							1.0   1.0
							0.0   1.0
						</texcoord>
						<texture static-src="button_home.png"/>
						<transforms>
						</transforms>					
					</trianglestrip>
				</if>
				
				<if bool="nextpage">
					<trianglestrip>
						<xyz>
							0.1		-0.13333333	0.0
							-0.1	-0.13333333	0.0
							0.1		0.13333333	0.0
							-0.1	0.13333333	0.0
						</xyz>
						<texcoord>
							1.0   0.0
							0.0   0.0
							1.0   1.0
							0.0   1.0
						</texcoord>
						<texture static-src="button_next.png"/>
						<transforms>
							<translate x="0.25"/>
						</transforms>					
					</trianglestrip>	
				</if>				
			</container>
		
		</world>


	</worlds>
	<initial-render-instructions>
		<render-to clear-color="#00FFFFFF" texture="text" viewport="text"/>
    <render-to clear-color="#00FFFFFF" texture="label_movie0" viewport="label_movie0"/>
    <render-to clear-color="#00FFFFFF" texture="label_movie1" viewport="label_movie1"/>
    <render-to clear-color="#00FFFFFF" texture="label_movie2" viewport="label_movie2"/>
	</initial-render-instructions>
	<render-instructions>    
		<render-to clear-color="#FF00FFAA" buffer="back" viewport="menu"/>
	</render-instructions>
</m3danim>
