31 lines
725 B
Plaintext
31 lines
725 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;
|
|
vec4 color = gl_Color;
|
|
vec3 uv = gl_MultiTexCoord0.xyz;
|
|
|
|
out vec4 vColor;
|
|
out vec2 vUv;
|
|
out float vFogUv;
|
|
|
|
uniform mat4 worldViewProj;
|
|
uniform float fogStart;
|
|
uniform float fogEnd;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = (worldViewProj * position);
|
|
|
|
vUv = uv.xy;
|
|
vFogUv = (fogEnd - gl_Position.z)/(fogEnd - fogStart);
|
|
vColor = clamp(color, vec4(0.0), vec4(1.0));
|
|
} |