Initial commit
This commit is contained in:
31
engines/hpl1/engine/impl/shaders/hpl1_Fog_Trans.vertex
Normal file
31
engines/hpl1/engine/impl/shaders/hpl1_Fog_Trans.vertex
Normal file
@@ -0,0 +1,31 @@
|
||||
// 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));
|
||||
}
|
||||
Reference in New Issue
Block a user