- shaders for last commit.

This commit is contained in:
Christoph Oelckers 2016-04-27 02:10:42 +02:00
parent 09f54b0940
commit 86f38475b0
2 changed files with 12 additions and 10 deletions

View File

@ -50,16 +50,18 @@ void main()
gl_Position = ProjectionMatrix * eyeCoordPos;
// clip planes used for reflective flats
if (uClipHeightBottom > -65536.0)
{
gl_ClipDistance[0] = worldcoord.y - uClipHeightBottom;
}
else if (uClipHeightTop < 65536.0)
{
gl_ClipDistance[0] = uClipHeightTop - worldcoord.y;
}
#if defined __GLSL_CG_DATA_TYPES && defined GLSL12_COMPATIBILE
gl_ClipVertex = eyeCoordPos;
#endif
// clip planes used for reflective flats
if (uClipHeightDirection != 0.0)
{
gl_ClipDistance[0] = (worldcoord.y - uClipHeight) * uClipHeightDirection;
}
// clip planes used for translucency splitting
gl_ClipDistance[1] = worldcoord.y - uClipSplit.x;
gl_ClipDistance[2] = uClipSplit.y - worldcoord.y;

View File

@ -6,7 +6,7 @@ precision highp float;
uniform vec4 uCameraPos;
uniform int uTextureMode;
uniform float uClipHeightTop, uClipHeightBottom;
uniform float uClipHeight, uClipHeightDirection;
uniform vec2 uClipSplit;
uniform float uAlphaThreshold;