anx.framework/shader/GL3/DualTexture.fx

60 lines
1.2 KiB
HLSL
Raw Normal View History

// 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
//TODO: dummy implementation / placeholder
2012-01-16 13:48:21 +00:00
vertexshaders
{
shader "VSDualTexture"
2012-01-16 13:48:21 +00:00
{
uniform mat4 WorldViewProj;
2012-01-16 13:48:21 +00:00
attribute vec4 pos;
attribute vec2 tex;
attribute vec2 tex2;
2012-01-16 13:48:21 +00:00
varying vec2 diffuseTexCoord;
varying vec2 diffuseTexCoord2;
2012-01-16 13:48:21 +00:00
void main( )
{
gl_Position = WorldViewProj * pos;
2012-01-16 13:48:21 +00:00
diffuseTexCoord = tex;
diffuseTexCoord2 = tex2;
2012-01-16 13:48:21 +00:00
}
}
}
2012-01-16 13:48:21 +00:00
fragmentshaders
{
shader "PSDualTexture"
2012-01-16 13:48:21 +00:00
{
uniform sampler2D Texture;
uniform sampler2D Texture2;
2012-01-16 13:48:21 +00:00
varying vec2 diffuseTexCoord;
varying vec2 diffuseTexCoord2;
2012-01-16 13:48:21 +00:00
void main( )
{
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
}
}
}
2012-01-16 13:48:21 +00:00
techniques
{
technique "DualTextureEffect"
2012-01-16 13:48:21 +00:00
{
vertex "SpriteVertexShader"
fragment "SpriteFragmentShader"
}
}