2012-08-25 17:27:45 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2011-11-23 10:13:38 +00:00
|
|
|
|
|
|
|
//TODO: dummy implementation / placeholder
|
|
|
|
|
2012-01-16 13:48:21 +00:00
|
|
|
vertexshaders
|
|
|
|
{
|
2012-08-25 17:27:45 +00:00
|
|
|
shader "VSDualTexture"
|
2012-01-16 13:48:21 +00:00
|
|
|
{
|
2012-08-25 17:27:45 +00:00
|
|
|
uniform mat4 WorldViewProj;
|
2011-11-23 10:13:38 +00:00
|
|
|
|
2012-01-16 13:48:21 +00:00
|
|
|
attribute vec4 pos;
|
|
|
|
attribute vec2 tex;
|
2012-08-25 17:27:45 +00:00
|
|
|
attribute vec2 tex2;
|
2011-11-23 10:13:38 +00:00
|
|
|
|
2012-01-16 13:48:21 +00:00
|
|
|
varying vec2 diffuseTexCoord;
|
2012-08-25 17:27:45 +00:00
|
|
|
varying vec2 diffuseTexCoord2;
|
2012-01-16 13:48:21 +00:00
|
|
|
void main( )
|
|
|
|
{
|
2012-08-25 17:27:45 +00:00
|
|
|
gl_Position = WorldViewProj * pos;
|
2012-01-16 13:48:21 +00:00
|
|
|
diffuseTexCoord = tex;
|
2012-08-25 17:27:45 +00:00
|
|
|
diffuseTexCoord2 = tex2;
|
2012-01-16 13:48:21 +00:00
|
|
|
}
|
|
|
|
}
|
2011-11-23 10:13:38 +00:00
|
|
|
}
|
|
|
|
|
2012-01-16 13:48:21 +00:00
|
|
|
fragmentshaders
|
|
|
|
{
|
2012-08-25 17:27:45 +00:00
|
|
|
shader "PSDualTexture"
|
2012-01-16 13:48:21 +00:00
|
|
|
{
|
|
|
|
uniform sampler2D Texture;
|
2012-08-25 17:27:45 +00:00
|
|
|
uniform sampler2D Texture2;
|
|
|
|
|
2012-01-16 13:48:21 +00:00
|
|
|
varying vec2 diffuseTexCoord;
|
2012-08-25 17:27:45 +00:00
|
|
|
varying vec2 diffuseTexCoord2;
|
2012-01-16 13:48:21 +00:00
|
|
|
void main( )
|
|
|
|
{
|
2012-08-25 17:27:45 +00:00
|
|
|
vec4 color = texture2D(Texture, diffuseTexCoord);
|
|
|
|
vec4 overlay = texture2D(Texture2, diffuseTexCoord2);
|
|
|
|
|
|
|
|
color.rgb *= 2;
|
|
|
|
|
|
|
|
// TODO
|
|
|
|
//color *= overlay * pin.Diffuse;
|
|
|
|
//ApplyFog(color, pin.Specular.w);
|
|
|
|
|
|
|
|
gl_FragColor = color;
|
2012-01-16 13:48:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-11-23 10:13:38 +00:00
|
|
|
|
2012-01-16 13:48:21 +00:00
|
|
|
techniques
|
2011-11-23 10:13:38 +00:00
|
|
|
{
|
2012-08-25 17:27:45 +00:00
|
|
|
technique "DualTextureEffect"
|
2012-01-16 13:48:21 +00:00
|
|
|
{
|
|
|
|
vertex "SpriteVertexShader"
|
|
|
|
fragment "SpriteFragmentShader"
|
|
|
|
}
|
2011-11-23 10:13:38 +00:00
|
|
|
}
|