mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
77 lines
1.6 KiB
Text
77 lines
1.6 KiB
Text
|
struct v2f {
|
||
|
vec4 pos;
|
||
|
vec2 texcoord;
|
||
|
vec3 cubenormal;
|
||
|
};
|
||
|
struct appdata {
|
||
|
vec4 vertex;
|
||
|
vec2 texcoord;
|
||
|
vec3 normal;
|
||
|
};
|
||
|
uniform vec4 _MainTex_ST;
|
||
|
v2f vert (
|
||
|
in appdata v_1
|
||
|
)
|
||
|
{
|
||
|
v2f o_2;
|
||
|
vec4 tmpvar_3;
|
||
|
tmpvar_3 = (gl_ModelViewProjectionMatrix * v_1.vertex);
|
||
|
o_2.pos = tmpvar_3;
|
||
|
vec2 tmpvar_4;
|
||
|
tmpvar_4 = ((v_1.texcoord.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
|
||
|
o_2.texcoord = tmpvar_4;
|
||
|
vec4 tmpvar_5;
|
||
|
tmpvar_5.w = 0.0;
|
||
|
tmpvar_5.xyz = v_1.normal.xyz;
|
||
|
vec3 tmpvar_6;
|
||
|
tmpvar_6 = (gl_ModelViewMatrix * tmpvar_5).xyz;
|
||
|
vec3 tmpvar_7;
|
||
|
tmpvar_7 = tmpvar_6;
|
||
|
o_2.cubenormal = tmpvar_7;
|
||
|
return o_2;
|
||
|
}
|
||
|
|
||
|
void main ()
|
||
|
{
|
||
|
appdata xlt_v_8;
|
||
|
v2f xl_retval_9;
|
||
|
vec4 tmpvar_10;
|
||
|
tmpvar_10 = gl_Vertex.xyzw;
|
||
|
vec4 tmpvar_11;
|
||
|
tmpvar_11 = tmpvar_10;
|
||
|
xlt_v_8.vertex = tmpvar_11;
|
||
|
vec2 tmpvar_12;
|
||
|
tmpvar_12 = gl_MultiTexCoord0.xy;
|
||
|
vec2 tmpvar_13;
|
||
|
tmpvar_13 = tmpvar_12;
|
||
|
xlt_v_8.texcoord = tmpvar_13;
|
||
|
vec3 tmpvar_14;
|
||
|
tmpvar_14 = gl_Normal.xyz;
|
||
|
vec3 tmpvar_15;
|
||
|
tmpvar_15 = tmpvar_14;
|
||
|
xlt_v_8.normal = tmpvar_15;
|
||
|
v2f tmpvar_16;
|
||
|
tmpvar_16 = vert (xlt_v_8);
|
||
|
v2f tmpvar_17;
|
||
|
tmpvar_17 = tmpvar_16;
|
||
|
xl_retval_9 = tmpvar_17;
|
||
|
vec4 tmpvar_18;
|
||
|
tmpvar_18 = xl_retval_9.pos.xyzw;
|
||
|
vec4 tmpvar_19;
|
||
|
tmpvar_19 = tmpvar_18;
|
||
|
gl_Position = tmpvar_19;
|
||
|
vec4 tmpvar_20;
|
||
|
tmpvar_20.zw = vec2(0.0, 0.0);
|
||
|
tmpvar_20.xy = xl_retval_9.texcoord.xy;
|
||
|
vec4 tmpvar_21;
|
||
|
tmpvar_21 = tmpvar_20;
|
||
|
gl_TexCoord[0] = tmpvar_21;
|
||
|
vec4 tmpvar_22;
|
||
|
tmpvar_22.w = 0.0;
|
||
|
tmpvar_22.xyz = xl_retval_9.cubenormal.xyz;
|
||
|
vec4 tmpvar_23;
|
||
|
tmpvar_23 = tmpvar_22;
|
||
|
gl_TexCoord[1] = tmpvar_23;
|
||
|
}
|
||
|
|