#version 150 in vec2 texCoord; in vec4 color; uniform mat4 projectionTransform; uniform mat4 viewTransform; uniform vec4 frontColor; uniform vec4 backColor; out vec2 vertTexCoord; out vec4 vertColor; void main() { vertColor = backColor + vec4(color.r * color.a, color.g * color.a, color.b * color.a, color.a) * frontColor * (vec4(1.0, 1.0, 1.0, 1.0) - backColor); vertTexCoord = texCoord; gl_Position = projectionTransform * viewTransform * vec4(texCoord, 0.0, 1.0); }