33 lines
840 B
Plaintext
33 lines
840 B
Plaintext
// Copyright 2006-2010 (C) - Frictional Games
|
|
//
|
|
// This file is part of HPL1 Engine
|
|
//
|
|
// For conditions of distribution and use, see copyright notice in LICENSE-shaders
|
|
//
|
|
|
|
///////////////////////////////////////////////////////
|
|
/// SIMPLE DIFFUSE COLOR VERTEX PROGRAM ////////////
|
|
///////////////////////////////////////////////////////
|
|
|
|
vec4 position = gl_Vertex;
|
|
vec3 color = gl_Color.xyz;
|
|
vec2 uv = gl_MultiTexCoord0.xy;
|
|
|
|
out vec2 vUv0;
|
|
out vec2 vUv1;
|
|
out vec2 vUv2;
|
|
out vec2 vUv3;
|
|
|
|
uniform mat4 worldViewProj;
|
|
uniform float yOffset;
|
|
uniform float xOffset;
|
|
uniform float amount;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = (worldViewProj * position);
|
|
vUv0 = uv + vec2(xOffset, yOffset) * amount;
|
|
vUv1 = uv + vec2(xOffset, yOffset) * 2.0 * amount;
|
|
vUv2 = uv - vec2(xOffset, yOffset) * amount;
|
|
vUv3 = uv - vec2(xOffset, yOffset) * 2.0 * amount;
|
|
} |