<?xml version="1.0" encoding="iso-8859-1" ?>
<sys:Export xmlns:sys="vrg/sys">	
	<Technique name="tech.bgGradient">
		<Pass>
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<Shader name="shader.gradient">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform vec3 color1;
					uniform vec3 color2;
					void main()
					{
						float len = length(gl_TexCoord[0].st);
						vec3 color = mix(color1, color2, len);
						color /= sqrt(2.0);
						gl_FragColor.rgb = color;
					}
				</Frag>
				<sys:Link src="../../../assets/color1" />
				<sys:Link src="../../../assets/color2" />
			</Shader>
		</Pass>		
	</Technique>
	<Technique name="tech.cross">
		<Pass>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/diffuseMap" />
				</Ref>
			</TextureUnit>	
			<DepthBuf>
				<BoolParam name="write">false</BoolParam>
				<BoolParam name="read">false</BoolParam>
			</DepthBuf>			
			<Blending></Blending>
			<Shader name="shader.cross">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = gl_MultiTexCoord0.st;//(gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform sampler2D diffuseMap;
					uniform float x_repeat;
					uniform float y_repeat;
					uniform float time;
					void main()
					{				
						x_repeat = max(1.0, x_repeat);
						y_repeat = max(1.0, y_repeat);
						gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].st*vec2(x_repeat, y_repeat));
					}
				</Frag>
				<IntParam name="diffuseMap">0</IntParam>
				<sys:Link src="../../../assets/x_repeat" />
				<sys:Link src="../../../assets/y_repeat" />
				<FloatParam name="time">
					<sys:Link src="/sys/timer/t" />
				</FloatParam>
			</Shader>
		</Pass>		
	</Technique>	
	<Shader name="shader.texturedScreenQuad">
		<Vert>
			void main()
			{
				gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
		        gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
			}
		</Vert>
		<Frag>
			uniform sampler2D diffuseMap;
			void main()
			{
				gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].st);
			}
		</Frag>
		<IntParam name="diffuseMap">0</IntParam>
	</Shader>
	<Technique name="tech.overlay">
		<Pass>
			<EnumParam name="draw">screen</EnumParam>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/diffuseMap" />
				</Ref>
			</TextureUnit>				
			<Blending>
				<EnumParam name="sfactor">one</EnumParam>
				<EnumParam name="dfactor">one_minus_src_alpha</EnumParam>
			</Blending>
			<Shader name="shader.overlay">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform sampler2D diffuseMap;
					uniform float repeat;
					void main()
					{
						gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].st*repeat);
					}
				</Frag>
				<IntParam name="diffuseMap">0</IntParam>
				<sys:Link src="../../../assets/repeat" />
			</Shader>
		</Pass>		
	</Technique>	
	<Technique name="tech.rury depth">
		<Pass>
			<Shader name="shader.rury depth">
				<Vert>
					varying float depth;
					uniform float near;
					uniform float far;
					void main()
					{
						gl_Position = ftransform();
						vec4 ecPos4 = gl_ModelViewMatrix * gl_Vertex;
						vec3 ecPos = ecPos4.xyz/ecPos4.w;
						depth = (max(0.0, -ecPos.z)-near)/(far-near); 
					}
				</Vert>
				<Frag>
					varying float depth;
					
					void main()
					{
						gl_FragColor = vec4(0.7, 0.6, 0.2, depth);
					}
				</Frag>
				<sys:Link src="../../../assets/near" />
				<sys:Link src="../../../assets/far" />
			</Shader>
		</Pass>		
	</Technique>	
	<Technique name="tech.torusTexture+depth">
		<Pass>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/diffuseMap/#Texture2D" />
				</Ref>
			</TextureUnit>
			<Shader name="shader.torusTexture+depth">
				<Vert>
					varying vec3 ecPos;
					uniform float time;
					
					void main()
					{
						gl_Position = ftransform();
						gl_TexCoord[0] = gl_MultiTexCoord0*2.0;
						gl_TexCoord[0].t += time;
						vec4 ecPos4 = gl_ModelViewMatrix * gl_Vertex;
						ecPos = ecPos4.xyz/ecPos4.w;
					}
				</Vert>
				<Frag>
					varying vec3 ecPos;
					uniform float near;
					uniform float far;
					uniform sampler2D diffuseMap;
					
					void main()
					{
						float depth = max(0.0, -ecPos.z) - near;
                        depth /= (far-near);
						gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].st);
						gl_FragColor.a = depth;
					}
				</Frag>
				<sys:Link src="../../../assets/near" />
				<sys:Link src="../../../assets/far" />
				<FloatParam name="time">
					<sys:Link src="/sys/timer/t" />
				</FloatParam>
			</Shader>
		</Pass>		
	</Technique>	
	<Technique name="tech.torusTexture+depth+blend">
		<Pass>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/diffuseMap/#Texture2D" />
				</Ref>
			</TextureUnit>
			<Blending></Blending>
			<DepthBuf>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<Shader name="shader.torusTexture+depth+blend">
				<Vert>
					varying vec3 ecPos;
					uniform float time;
					
					void main()
					{
						gl_Position = ftransform();
						gl_TexCoord[0] = gl_MultiTexCoord0*2.0;
						//gl_TexCoord[0].t += time;
						vec4 ecPos4 = gl_ModelViewMatrix * gl_Vertex;
						ecPos = ecPos4.xyz/ecPos4.w;
					}
				</Vert>
				<Frag>
					varying vec3 ecPos;
					uniform float near;
					uniform float far;
					uniform sampler2D diffuseMap;
					
					void main()
					{
						float depth = max(0.0, -ecPos.z) - near;
                        depth /= (far-near);
						gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].st);
						gl_FragColor.a = depth;
						
						gl_FragColor.a = 0.5;
					}
				</Frag>
				<sys:Link src="../../../assets/near" />
				<sys:Link src="../../../assets/far" />
				<FloatParam name="time">
					<sys:Link src="/sys/timer/t" />
				</FloatParam>
			</Shader>
		</Pass>		
	</Technique>	
	<Technique name="tech.drawPBuffer">
		<Pass name="pass">
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/#PBuffer" />
				</Ref>
			</TextureUnit>
			<Shader name="shader.drawPBuffer">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform sampler2D diffuseMap;
					void main()
					{
						gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].st);
					}
				</Frag>
				<IntParam name="diffuseMap">0</IntParam>
			</Shader>
		</Pass>		
	</Technique>	
	<Technique name="tech.blur">
		<Pass name="horizontalPass">
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/#PBuffer" />
				</Ref>
			</TextureUnit>
			<RenderTarget name="rt">
				<Ref name="color">
					<PBuffer name="pbo.tmp">
						<StringParam name="mode">rgba tex2D</StringParam>
						<IntParam name="width">512</IntParam>
						<IntParam name="height">512</IntParam>			
					</PBuffer>
				</Ref>
			</RenderTarget>
			<Shader name="shader.horizontalPass">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform sampler2D diffuseMap;
					void main()
					{
						vec2 origin = gl_TexCoord[0].st;
						vec2 d = vec2(0.5, 0.5);
                        vec2 coord;
                        vec4 color = 20.0 * texture2D(diffuseMap, origin);

                        d = vec2(1.0/512.0, 0.0);
						coord = origin + (-5.0*d);
						color +=  1.0 * texture2D(diffuseMap, coord);
						coord = origin + (-3.0*d);
						color +=  6.0 * texture2D(diffuseMap, coord);
						coord = origin + (-1.0*d);
						color += 15.0 * texture2D(diffuseMap, coord);
 						coord = origin + ( 1.0*d);
					    color += 15.0 * texture2D(diffuseMap, coord);
					    coord = origin + ( 3.0*d);
						color +=  6.0 * texture2D(diffuseMap, coord);
						coord = origin + ( 5.0*d);
						color +=  1.0 * texture2D(diffuseMap, coord);
						
						/*d = vec2(1.0/256.0, 0.0);
						coord = origin + (-5.0*d);
						color +=  1.0 * texture2D(diffuseMap, coord);
						coord = origin + (-3.0*d);
						color +=  6.0 * texture2D(diffuseMap, coord);
						coord = origin + (-1.0*d);
						color += 15.0 * texture2D(diffuseMap, coord);
						coord = origin + (-0.0*d);
						color += 20.0 * texture2D(diffuseMap, coord);
						coord = origin + ( 1.0*d);
					    color += 15.0 * texture2D(diffuseMap, coord);
					    coord = origin + ( 3.0*d);
						color +=  6.0 * texture2D(diffuseMap, coord);
						coord = origin + ( 5.0*d);
						color +=  1.0 * texture2D(diffuseMap, coord);

						color /= 128.0;
						*/
						color /= 64.0;
						
						gl_FragColor = color;
					}
				</Frag>
				<IntParam name="diffuseMap">0</IntParam>
			</Shader>
		</Pass>		
		<Pass name="verticalPass">
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../horizontalPass/rt/color/pbo.tmp" />
				</Ref>
			</TextureUnit>
			<RenderTarget name="rt">
				<Ref name="color">
					<sys:Link src="../../../../assets/#PBuffer" />
				</Ref>
			</RenderTarget>
			<Shader name="shader.verticalPass2">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
				    float gauss_sum = 64.0;
					uniform sampler2D diffuseMap;
					void main()
					{

						vec2 origin = gl_TexCoord[0].st;
						vec2 d, coord;
                        vec4 color = 20.0 * texture2D(diffuseMap, origin);

                        d = vec2(0.0, 1.0/512.0);
						coord = origin + (-5.0*d);
						color +=  1.0 * texture2D(diffuseMap, coord);
						coord = origin + (-3.0*d);
						color +=  6.0 * texture2D(diffuseMap, coord);
						coord = origin + (-1.0*d);
						color += 15.0 * texture2D(diffuseMap, coord);
						coord = origin + ( 1.0*d);
					    color += 15.0 * texture2D(diffuseMap, coord);
					    coord = origin + ( 3.0*d);
						color +=  6.0 * texture2D(diffuseMap, coord);
						coord = origin + ( 5.0*d);
						color +=  1.0 * texture2D(diffuseMap, coord);

						/*d = vec2(0.0, 1.0/256.0);
						coord = origin + (-5.0*d);
						color +=  1.0 * texture2D(diffuseMap, coord);
						coord = origin + (-3.0*d);
						color +=  6.0 * texture2D(diffuseMap, coord);
						coord = origin + (-1.0*d);
						color += 15.0 * texture2D(diffuseMap, coord);
						coord = origin + (-0.0*d);
						color += 20.0 * texture2D(diffuseMap, coord);
						coord = origin + ( 1.0*d);
					    color += 15.0 * texture2D(diffuseMap, coord);
					    coord = origin + ( 3.0*d);
						color +=  6.0 * texture2D(diffuseMap, coord);
						coord = origin + ( 5.0*d);
						color +=  1.0 * texture2D(diffuseMap, coord);
						
						color /= 128.0;
						*/
						color /= 64.0;
						
						gl_FragColor = color;
					}
				</Frag>
				<IntParam name="diffuseMap">0</IntParam>
			</Shader>
		</Pass>
	</Technique>
	<Technique name="tech.dof">
		<Pass name="pass">
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/primary/#PBuffer" />
				</Ref>
				<Ref name="t1">
					<sys:Link src="../../../../assets/blurred/#PBuffer" />
				</Ref>
			</TextureUnit>
			<Shader name="shader.dof">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform sampler2D primary;
					uniform sampler2D blurred;
					uniform float range;
					uniform float focus;
					void main()
					{
						vec4 primaryColor = texture2D(primary, gl_TexCoord[0].st);
						vec4 blurredColor = 2.0 * texture2D(blurred, gl_TexCoord[0].st);
						float d = 1.0/128.0;
						blurredColor += texture2D(blurred, gl_TexCoord[0].st + vec2(-d,-d));
						blurredColor += texture2D(blurred, gl_TexCoord[0].st + vec2(-d, d));
						blurredColor += texture2D(blurred, gl_TexCoord[0].st + vec2( d, d));
						blurredColor += texture2D(blurred, gl_TexCoord[0].st + vec2( d,-d));
						blurredColor /= 6.0;
						
						float dist = primaryColor.a;
						dist = clamp(range * abs(focus - dist), 0.0, 1.0);
						gl_FragColor = mix(primaryColor, blurredColor, dist);
						//gl_FragColor = vec4(dist);
					}
				</Frag>
				<FloatParam name="range">7</FloatParam>
				<FloatParam name="focus">0.33</FloatParam>
				<IntParam name="primary">0</IntParam>
				<IntParam name="blurred">1</IntParam>
			</Shader>
		</Pass>		
	</Technique>
	<Technique name="tech.rury">
		<Pass name="pass">
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/#PBuffer" />
				</Ref>
			</TextureUnit>
			<Shader name="shader.rury">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform sampler2D primary;
					uniform float range;
					uniform float focus;
					void main()
					{
						vec4 c = texture2D(primary, gl_TexCoord[0].st);
						float val =  c.a;
						gl_FragColor = vec4(val);
					}
				</Frag>
				<IntParam name="primary">0</IntParam>
			</Shader>
		</Pass>		
	</Technique>
	<Technique name="tech.fade">
		<Pass>
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<Blending>
				<EnumParam name="sfactor">zero</EnumParam>
				<EnumParam name="dfactor">one_minus_src_alpha</EnumParam>
			</Blending>
			<Shader name="shader.rury">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform float alpha;
					void main()
					{
						gl_FragColor = vec4(alpha);
					}
				</Frag>
				<sys:Link src="../../../assets/alpha" />
			</Shader>
		</Pass>		
	</Technique>
	<Technique name="tech.fadeWhite">
		<Pass>
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<Blending>
				<EnumParam name="sfactor">src_alpha</EnumParam>
				<EnumParam name="dfactor">one_minus_src_alpha</EnumParam>
			</Blending>
			<Shader name="shader.fadeWhite">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform float alpha;
					void main()
					{
						gl_FragColor.rgb = vec3(0.0, 0.0, 0.0);
						gl_FragColor.a = alpha;
					}
				</Frag>
				<sys:Link src="../../../assets/alpha" />
			</Shader>
		</Pass>		
	</Technique>
	<Technique name="tech.credits">
		<Pass>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/diffuseMap" />
				</Ref>
			</TextureUnit>
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<Blending>
				<EnumParam name="sfactor">src_alpha</EnumParam>
				<EnumParam name="dfactor">one</EnumParam>
			</Blending>
			<Shader name="shader.credits">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform float alpha;
					uniform sampler2D diffuseMap;
					void main()
					{
						gl_FragColor.rgb = texture2D(diffuseMap, gl_TexCoord[0].st).rgb;
						gl_FragColor.a = alpha;
					}
				</Frag>
				<sys:Link src="../../../assets/alpha" />
				<IntParam name="diffuseMap">0</IntParam>
			</Shader>
		</Pass>		
	</Technique>
	<Technique name="tech.tunelSurface">
		<Pass name="pass">
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/diffuseMap" />
				</Ref>
				<Ref name="t1">
					<sys:Link src="../../../../assets/normalMap" />
				</Ref>
			</TextureUnit>
				<Shader name="shader.parallaxBumpMapping">
					<Vert>
						attribute vec3 Tangent;
						
						varying vec3 ecPos;
						varying vec3 ecNormal;
						
						varying vec3 tcLight;
						varying vec3 tcLight2;
						varying vec3 tcLight2Pos;
						varying vec3 tcView;
						varying vec3 tcPos;
				
						void main()
						{	
							//gl_Vertex.xyz += 5*gl_Normal;
							gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
							
							gl_TexCoord[0] = gl_MultiTexCoord0;
							gl_TexCoord[0].s *= 2;
							
							ecNormal = gl_NormalMatrix * gl_Normal;
							vec4 ecPos4 = gl_ModelViewMatrix * gl_Vertex;
							ecPos = ecPos4.xyz/ecPos4.w;
							vec3 ecLight = gl_LightSource[0].position - ecPos;
							vec3 ecLight2 = gl_LightSource[1].position - ecPos;
							vec3 ecView = -ecPos;
							
							vec3 nNormal   = gl_NormalMatrix * gl_Normal;
							vec3 nBinormal = gl_NormalMatrix * cross(Tangent, gl_Normal);
							vec3 nTangent  = gl_NormalMatrix * Tangent;
							
							mat3 TBN = mat3(
								nTangent,
								nBinormal,
								nNormal
							);
							
							tcLight  = ecLight * TBN;
							tcLight2  = ecLight2 * TBN;
							tcLight2Pos = gl_LightSource[1].position.xyz * TBN;
							tcView  = ecView * TBN;
							tcPos = ecPos * TBN;
						}
					</Vert>
					<Frag>
						uniform sampler2D diffuseMap;
						uniform sampler2D normalMap;
						float scale = 0.02;
						
						varying vec3 ecNormal;
						varying vec3 ecPos;

						varying vec3 tcLight;
						varying vec3 tcLight2;
						varying vec3 tcLight2Pos;
						varying vec3 tcView;
						varying vec3 tcPos;
						
						float diffuse(vec3 N, vec3 L)
						{
							return max(0.0, dot(N, L));
						}
												
						float phong(vec3 N, vec3 V, vec3 L)
						{
							vec3 reflectDir = -reflect(L, N);
							float specular = max(0.0, dot(reflectDir, V));
							specular = pow(specular, 64.0); 
							return specular;
						}
						
						float diffusePhong(vec3 N, vec3 V, vec3 L)
						{
							float result = diffuse(N,L) + phong(N,V,L);
							//result = clamp(result, 0.0, 1.0);
							return result;				
						}
						
						void main()
						{
							vec2  texCoord = gl_TexCoord[0].st;
							
							vec3  nView = normalize(tcView);
							      
							float height = texture2D(normalMap,  texCoord).a;
							float bias = scale * (-0.5);
							float hsb = height * scale + bias;
							vec2  texCoordDelta = (hsb * nView.xy/nView.z);   
							   
							vec3 nNormal = -normalize(2.0*(texture2D(normalMap, texCoord + texCoordDelta).rgb - 0.5));
							
							vec3 nLight = normalize(tcLight);				   
							vec3 reflectDir = -reflect(nView, nNormal);
							vec4 envColor = texture2D(diffuseMap,  texCoord + texCoordDelta);
							vec4 color = envColor * diffusePhong(nNormal, nView, nLight);
							color.rgb = (color.r + color.g + color.b)/3.0;
							
							vec4 color2 = vec4(0.2, 0.85, 1.0, 1.0);
							float shift = 5.0;
							float z = max(-ecPos.z, shift);
							float depth = (clamp(z, shift, 30.0+shift) - shift)/30.0;
							
							
							gl_FragColor =  mix(color, color2, depth);
						}
					</Frag>
					<IntParam name="diffuseMap">0</IntParam>
					<IntParam name="normalMap">1</IntParam>
				</Shader>
		</Pass>		
	</Technique>
	<Technique name="tech.tunelScreen">
		<Pass name="pass">
			<EnumParam name="draw">screen</EnumParam>
			<DepthBuf>
				<BoolParam name="read">false</BoolParam>
				<BoolParam name="write">false</BoolParam>
			</DepthBuf>
			<Blending>
				<EnumParam name="sfactor">src_alpha</EnumParam>
				<EnumParam name="dfactor">one_minus_src_alpha</EnumParam>
			</Blending>
			<TextureUnit>
				<Ref name="t0">
					<sys:Link src="../../../../assets/#PBuffer" />
				</Ref>
			</TextureUnit>
			<Shader name="shader.tunelScreen">
				<Vert>
					void main()
					{
						gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
						gl_TexCoord[0].st = (gl_Position.xy + vec2(1.0))/2.0;
					}
				</Vert>
				<Frag>
					uniform sampler2D buffer;
					uniform float alpha;
					void main()
					{
						gl_FragColor = texture2D(buffer, gl_TexCoord[0].st);
						gl_FragColor.a = alpha;
					}
				</Frag>
				<IntParam name="buffer">0</IntParam>
				<sys:Link src="../../../assets/alpha" />
			</Shader>
		</Pass>		
	</Technique>
		<Technique name="tech.whiteTorus">
		<Pass>
			<DepthBuf>
				<BoolParam name="write">false</BoolParam>
				<BoolParam name="read">false</BoolParam>
			</DepthBuf>
			<Shader name="shader.whiteTorus">
				<Vert>
					void main()
					{
						gl_Position = ftransform();
					}
				</Vert>
				<Frag>
					void main()
					{
						gl_FragColor = vec4(1.0);
					}
				</Frag>
			</Shader>
		</Pass>		
	</Technique>
</sys:Export>
