- changed shaders.

This commit is contained in:
Christoph Oelckers 2015-04-05 20:20:56 +02:00
parent cf7cb4f00f
commit b45c88fc4f
2 changed files with 9 additions and 0 deletions

View file

@ -43,6 +43,11 @@ void main()
#endif #endif
gl_Position = ProjectionMatrix * eyeCoordPos; gl_Position = ProjectionMatrix * eyeCoordPos;
// clip planes used for reflective flats
gl_ClipDistance[0] = worldcoord.y - uClipHeightBottom; gl_ClipDistance[0] = worldcoord.y - uClipHeightBottom;
gl_ClipDistance[1] = uClipHeightTop - worldcoord.y; gl_ClipDistance[1] = uClipHeightTop - worldcoord.y;
gl_ClipDistance[2] = worldcoord.y - uClipSplit.x;
gl_ClipDistance[3] = uClipSplit.y - worldcoord.y;
} }

View file

@ -7,6 +7,7 @@ precision highp float;
uniform vec4 uCameraPos; uniform vec4 uCameraPos;
uniform int uTextureMode; uniform int uTextureMode;
uniform float uClipHeightTop, uClipHeightBottom; uniform float uClipHeightTop, uClipHeightBottom;
uniform vec2 uClipSplit;
uniform float uAlphaThreshold; uniform float uAlphaThreshold;
@ -29,6 +30,9 @@ uniform vec4 uGlowTopColor;
uniform vec4 uGlowBottomPlane; uniform vec4 uGlowBottomPlane;
uniform vec4 uGlowBottomColor; uniform vec4 uGlowBottomColor;
uniform vec4 uSplitTopPlane;
uniform vec4 uSplitBottomPlane;
// Lighting + Fog // Lighting + Fog
uniform vec4 uLightAttr; uniform vec4 uLightAttr;
#define uLightLevel uLightAttr.a #define uLightLevel uLightAttr.a