shaders.glsl.vs_led.bin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glx Show documentation
Show all versions of glx Show documentation
UI harness for the LX framework based upon LWJGL + bgfx.
The newest version!
VSH OE?I u_modelViewProj u_dimensions u_sparkle l attribute vec4 a_color0;
attribute vec3 a_position;
attribute vec2 a_texcoord0;
varying vec4 v_color0;
varying vec2 v_texcoord0;
varying vec3 v_texcoord1;
uniform mat4 u_modelViewProj;
uniform vec4 u_dimensions;
uniform vec4 u_sparkle;
void main ()
{
float ratio_1;
float adjusted_2;
float tmpvar_3;
tmpvar_3 = max (max (a_color0.x, a_color0.y), a_color0.z);
adjusted_2 = tmpvar_3;
ratio_1 = 1.0;
if ((tmpvar_3 > 0.0)) {
adjusted_2 = (1.0 - pow ((1.0 - tmpvar_3), u_dimensions.x));
ratio_1 = (adjusted_2 / tmpvar_3);
};
vec4 tmpvar_4;
tmpvar_4.xyz = (a_color0.xyz * ratio_1);
tmpvar_4.w = a_color0.w;
v_color0 = tmpvar_4;
vec4 tmpvar_5;
tmpvar_5.w = 1.0;
tmpvar_5.xyz = a_position;
vec2 tmpvar_6;
tmpvar_6.x = 1.0;
tmpvar_6.y = u_dimensions.z;
vec4 tmpvar_7;
tmpvar_7.zw = vec2(0.0, 0.0);
tmpvar_7.xy = (tmpvar_6 * (a_texcoord0 - vec2(0.5, 0.5)));
gl_Position = ((u_modelViewProj * tmpvar_5) + ((u_dimensions.w *
mix (1.0, clamp (sqrt(dot (tmpvar_4.xyz, tmpvar_4.xyz)), 0.0, 1.0), u_dimensions.y)
) * tmpvar_7));
v_texcoord0 = a_texcoord0;
float tmpvar_8;
tmpvar_8 = max (max (tmpvar_4.x, tmpvar_4.y), tmpvar_4.z);
float tmpvar_9;
tmpvar_9 = (u_sparkle.w + (tmpvar_8 * u_sparkle.z));
float tmpvar_10;
tmpvar_10 = sin(tmpvar_9);
float tmpvar_11;
tmpvar_11 = cos(tmpvar_9);
float tmpvar_12;
tmpvar_12 = pow (tmpvar_8, u_sparkle.y);
float tmpvar_13;
tmpvar_13 = mix (3.0, 1.0, tmpvar_12);
vec3 tmpvar_14;
float tmpvar_15;
tmpvar_15 = (a_texcoord0.x - 0.5);
float tmpvar_16;
tmpvar_16 = (a_texcoord0.y - 0.5);
tmpvar_14.x = ((0.5 + (
(tmpvar_13 * tmpvar_15)
* tmpvar_11)) - ((tmpvar_13 * tmpvar_16) * tmpvar_10));
tmpvar_14.y = ((0.5 + (
(tmpvar_13 * tmpvar_15)
* tmpvar_10)) + ((tmpvar_13 * tmpvar_16) * tmpvar_11));
tmpvar_14.z = (u_sparkle.x * tmpvar_12);
v_texcoord1 = tmpvar_14;
}