mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-12 01:01:30 -05:00
84 lines
1.7 KiB
Text
84 lines
1.7 KiB
Text
|
struct v2f {
|
||
|
vec4 pos;
|
||
|
vec2 uv;
|
||
|
};
|
||
|
struct appdata_base {
|
||
|
vec4 vertex;
|
||
|
vec3 normal;
|
||
|
vec4 texcoord;
|
||
|
};
|
||
|
uniform sampler2D _MainTex;
|
||
|
vec4 xll_tex2Dlod (
|
||
|
in sampler2D s_1,
|
||
|
in vec4 coord_2
|
||
|
)
|
||
|
{
|
||
|
vec4 tmpvar_3;
|
||
|
tmpvar_3 = texture2DLod (s_1, coord_2.xy, coord_2.w);
|
||
|
return tmpvar_3;
|
||
|
}
|
||
|
|
||
|
v2f vert (
|
||
|
in appdata_base v_4
|
||
|
)
|
||
|
{
|
||
|
v2f o_5;
|
||
|
vec4 tex_6;
|
||
|
vec4 tmpvar_7;
|
||
|
tmpvar_7.zw = vec2(0.0, 0.0);
|
||
|
tmpvar_7.xy = v_4.texcoord.xy.xy;
|
||
|
vec4 tmpvar_8;
|
||
|
tmpvar_8 = xll_tex2Dlod (_MainTex, tmpvar_7);
|
||
|
vec4 tmpvar_9;
|
||
|
tmpvar_9 = tmpvar_8;
|
||
|
tex_6 = tmpvar_9;
|
||
|
float tmpvar_10;
|
||
|
tmpvar_10 = (v_4.vertex.y + (tex_6.x * 2.0));
|
||
|
v_4.vertex.y = vec2(tmpvar_10).y;
|
||
|
vec4 tmpvar_11;
|
||
|
tmpvar_11 = (gl_ModelViewProjectionMatrix * v_4.vertex);
|
||
|
o_5.pos = tmpvar_11;
|
||
|
vec2 tmpvar_12;
|
||
|
tmpvar_12 = v_4.texcoord.xy;
|
||
|
o_5.uv = tmpvar_12;
|
||
|
return o_5;
|
||
|
}
|
||
|
|
||
|
void main ()
|
||
|
{
|
||
|
appdata_base xlt_v_13;
|
||
|
v2f xl_retval_14;
|
||
|
vec4 tmpvar_15;
|
||
|
tmpvar_15 = gl_Vertex.xyzw;
|
||
|
vec4 tmpvar_16;
|
||
|
tmpvar_16 = tmpvar_15;
|
||
|
xlt_v_13.vertex = tmpvar_16;
|
||
|
vec3 tmpvar_17;
|
||
|
tmpvar_17 = gl_Normal.xyz;
|
||
|
vec3 tmpvar_18;
|
||
|
tmpvar_18 = tmpvar_17;
|
||
|
xlt_v_13.normal = tmpvar_18;
|
||
|
vec4 tmpvar_19;
|
||
|
tmpvar_19 = gl_MultiTexCoord0.xyzw;
|
||
|
vec4 tmpvar_20;
|
||
|
tmpvar_20 = tmpvar_19;
|
||
|
xlt_v_13.texcoord = tmpvar_20;
|
||
|
v2f tmpvar_21;
|
||
|
tmpvar_21 = vert (xlt_v_13);
|
||
|
v2f tmpvar_22;
|
||
|
tmpvar_22 = tmpvar_21;
|
||
|
xl_retval_14 = tmpvar_22;
|
||
|
vec4 tmpvar_23;
|
||
|
tmpvar_23 = xl_retval_14.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_14.uv.xy;
|
||
|
vec4 tmpvar_26;
|
||
|
tmpvar_26 = tmpvar_25;
|
||
|
gl_TexCoord[0] = tmpvar_26;
|
||
|
}
|
||
|
|