mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 09:08:22 -05:00
90 lines
1.8 KiB
Text
90 lines
1.8 KiB
Text
struct appdata_img {
|
|
vec4 vertex;
|
|
vec2 texcoord;
|
|
};
|
|
struct v2f {
|
|
vec4 pos;
|
|
vec2 uv;
|
|
vec2 uvOrig;
|
|
};
|
|
uniform vec4 _CenterRadius;
|
|
vec2 MultiplyUV (
|
|
in mat4 mat_1,
|
|
in vec2 inUV_2
|
|
)
|
|
{
|
|
vec4 temp_3;
|
|
vec4 tmpvar_4;
|
|
tmpvar_4.zw = vec2(0.0, 0.0);
|
|
tmpvar_4.x = inUV_2.x;
|
|
tmpvar_4.y = inUV_2.y;
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = tmpvar_4;
|
|
temp_3 = tmpvar_5;
|
|
vec4 tmpvar_6;
|
|
tmpvar_6 = (mat_1 * temp_3);
|
|
temp_3 = tmpvar_6;
|
|
return temp_3.xy;
|
|
}
|
|
|
|
v2f vert (
|
|
in appdata_img v_7
|
|
)
|
|
{
|
|
vec2 uv_8;
|
|
v2f o_9;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10 = (gl_ModelViewProjectionMatrix * v_7.vertex);
|
|
o_9.pos = tmpvar_10;
|
|
vec2 tmpvar_11;
|
|
tmpvar_11 = (v_7.texcoord.xy - _CenterRadius.xy);
|
|
uv_8 = tmpvar_11;
|
|
vec2 tmpvar_12;
|
|
tmpvar_12 = MultiplyUV (gl_TextureMatrix[0], uv_8);
|
|
vec2 tmpvar_13;
|
|
tmpvar_13 = tmpvar_12;
|
|
o_9.uv = tmpvar_13;
|
|
vec2 tmpvar_14;
|
|
tmpvar_14 = uv_8;
|
|
o_9.uvOrig = tmpvar_14;
|
|
return o_9;
|
|
}
|
|
|
|
void main ()
|
|
{
|
|
appdata_img xlt_v_15;
|
|
v2f xl_retval_16;
|
|
vec4 tmpvar_17;
|
|
tmpvar_17 = gl_Vertex.xyzw;
|
|
vec4 tmpvar_18;
|
|
tmpvar_18 = tmpvar_17;
|
|
xlt_v_15.vertex = tmpvar_18;
|
|
vec2 tmpvar_19;
|
|
tmpvar_19 = gl_MultiTexCoord0.xy;
|
|
vec2 tmpvar_20;
|
|
tmpvar_20 = tmpvar_19;
|
|
xlt_v_15.texcoord = tmpvar_20;
|
|
v2f tmpvar_21;
|
|
tmpvar_21 = vert (xlt_v_15);
|
|
v2f tmpvar_22;
|
|
tmpvar_22 = tmpvar_21;
|
|
xl_retval_16 = tmpvar_22;
|
|
vec4 tmpvar_23;
|
|
tmpvar_23 = xl_retval_16.pos.xyzw;
|
|
vec4 tmpvar_24;
|
|
tmpvar_24 = tmpvar_23;
|
|
gl_Position = tmpvar_24;
|
|
vec4 tmpvar_25;
|
|
tmpvar_25.zw = vec2(0.0, 0.0);
|
|
tmpvar_25.xy = xl_retval_16.uv.xy;
|
|
vec4 tmpvar_26;
|
|
tmpvar_26 = tmpvar_25;
|
|
gl_TexCoord[0] = tmpvar_26;
|
|
vec4 tmpvar_27;
|
|
tmpvar_27.zw = vec2(0.0, 0.0);
|
|
tmpvar_27.xy = xl_retval_16.uvOrig.xy;
|
|
vec4 tmpvar_28;
|
|
tmpvar_28 = tmpvar_27;
|
|
gl_TexCoord[1] = tmpvar_28;
|
|
}
|
|
|