#version 300 es // composite // features: ["TEXTURE_EXTERNAL"] #extension GL_OES_EGL_image_external_essl3 : enable uniform highp mat4 uTransform; in highp vec2 aPosition; uniform lowp samplerExternalOES sColor0; out highp vec2 vUv; flat out highp vec4 vColor; flat out highp vec4 vUVBounds; in highp vec4 aLocalRect; in highp vec4 aDeviceClipRect; in highp vec4 aColor; in highp vec4 aParams; in highp vec4 aTransform; in highp vec4 aUvRect0; void main () { highp vec4 uvBounds_1; highp vec2 uv_2; vec2 tmpvar_3; tmpvar_3 = ((aLocalRect.xy * aTransform.xy) + aTransform.zw); vec2 tmpvar_4; tmpvar_4 = ((aLocalRect.zw * aTransform.xy) + aTransform.zw); vec2 tmpvar_5; tmpvar_5 = min (max (mix (tmpvar_3, tmpvar_4, aPosition), aDeviceClipRect.xy), aDeviceClipRect.zw); vec2 tmpvar_6; tmpvar_6 = mix (aUvRect0.xy, aUvRect0.zw, ((tmpvar_5 - tmpvar_3) / (tmpvar_4 - tmpvar_3))); uv_2 = tmpvar_6; uvBounds_1 = aUvRect0; int tmpvar_7; tmpvar_7 = int(aParams.y); if ((tmpvar_7 == 1)) { vec2 tmpvar_8; tmpvar_8 = vec2(textureSize (sColor0, 0)); uvBounds_1 = (aUvRect0 + vec4(0.5, 0.5, -0.5, -0.5)); uv_2 = (tmpvar_6 / tmpvar_8); uvBounds_1 = (uvBounds_1 / tmpvar_8.xyxy); }; vUv = uv_2; vUVBounds = uvBounds_1; vColor = aColor; vec4 tmpvar_9; tmpvar_9.w = 1.0; tmpvar_9.xy = tmpvar_5; tmpvar_9.z = aParams.x; gl_Position = (uTransform * tmpvar_9); }