mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 09:08:22 -05:00
84 lines
1.6 KiB
Text
84 lines
1.6 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,
|
||
|
in vec4 coord
|
||
|
)
|
||
|
{
|
||
|
vec4 tmpvar_1;
|
||
|
tmpvar_1 = texture2DLod (s, coord.xy, coord.w);
|
||
|
return tmpvar_1;
|
||
|
}
|
||
|
|
||
|
v2f vert (
|
||
|
in appdata_base v
|
||
|
)
|
||
|
{
|
||
|
v2f o;
|
||
|
vec4 tex;
|
||
|
vec4 tmpvar_1;
|
||
|
tmpvar_1.zw = vec2(0.0, 0.0);
|
||
|
tmpvar_1.xy = v.texcoord.xy.xy;
|
||
|
vec4 tmpvar_2;
|
||
|
tmpvar_2 = xll_tex2Dlod (_MainTex, tmpvar_1);
|
||
|
vec4 tmpvar_3;
|
||
|
tmpvar_3 = tmpvar_2;
|
||
|
tex = tmpvar_3;
|
||
|
float tmpvar_4;
|
||
|
tmpvar_4 = (v.vertex.y + (tex.x * 2.0));
|
||
|
v.vertex.y = vec2(tmpvar_4).y;
|
||
|
vec4 tmpvar_5;
|
||
|
tmpvar_5 = (gl_ModelViewProjectionMatrix * v.vertex);
|
||
|
o.pos = tmpvar_5;
|
||
|
vec2 tmpvar_6;
|
||
|
tmpvar_6 = v.texcoord.xy;
|
||
|
o.uv = tmpvar_6;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
void main ()
|
||
|
{
|
||
|
appdata_base xlt_v;
|
||
|
v2f xl_retval;
|
||
|
vec4 tmpvar_1;
|
||
|
tmpvar_1 = gl_Vertex.xyzw;
|
||
|
vec4 tmpvar_2;
|
||
|
tmpvar_2 = tmpvar_1;
|
||
|
xlt_v.vertex = tmpvar_2;
|
||
|
vec3 tmpvar_3;
|
||
|
tmpvar_3 = gl_Normal.xyz;
|
||
|
vec3 tmpvar_4;
|
||
|
tmpvar_4 = tmpvar_3;
|
||
|
xlt_v.normal = tmpvar_4;
|
||
|
vec4 tmpvar_5;
|
||
|
tmpvar_5 = gl_MultiTexCoord0.xyzw;
|
||
|
vec4 tmpvar_6;
|
||
|
tmpvar_6 = tmpvar_5;
|
||
|
xlt_v.texcoord = tmpvar_6;
|
||
|
v2f tmpvar_7;
|
||
|
tmpvar_7 = vert (xlt_v);
|
||
|
v2f tmpvar_8;
|
||
|
tmpvar_8 = tmpvar_7;
|
||
|
xl_retval = tmpvar_8;
|
||
|
vec4 tmpvar_9;
|
||
|
tmpvar_9 = xl_retval.pos.xyzw;
|
||
|
vec4 tmpvar_10;
|
||
|
tmpvar_10 = tmpvar_9;
|
||
|
gl_Position = tmpvar_10;
|
||
|
vec4 tmpvar_11;
|
||
|
tmpvar_11.zw = vec2(0.0, 0.0);
|
||
|
tmpvar_11.xy = xl_retval.uv.xy;
|
||
|
vec4 tmpvar_12;
|
||
|
tmpvar_12 = tmpvar_11;
|
||
|
gl_TexCoord[0] = tmpvar_12;
|
||
|
}
|
||
|
|