Urho3D/bin/CoreData/Shaders/GLSL/Urho2D.glsl
2015-01-18 21:31:13 +08:00

24 lines
468 B
GLSL

#include "Uniforms.glsl"
#include "Samplers.glsl"
#include "Transform.glsl"
varying vec2 vTexCoord;
varying vec4 vColor;
void VS()
{
mat4 modelMatrix = iModelMatrix;
vec3 worldPos = GetWorldPos(modelMatrix);
gl_Position = GetClipPos(worldPos);
vTexCoord = iTexCoord;
vColor = iColor;
}
void PS()
{
vec4 diffColor = cMatDiffColor * vColor;
vec4 diffInput = texture2D(sDiffMap, vTexCoord);
gl_FragColor = diffColor * diffInput;
}