mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
38 lines
727 B
Text
38 lines
727 B
Text
struct v2f_vertex_lit {
|
|
vec2 uv;
|
|
vec4 diff;
|
|
vec4 spec;
|
|
};
|
|
struct v2f_img {
|
|
vec4 pos;
|
|
vec2 uv;
|
|
};
|
|
struct appdata_img {
|
|
vec4 vertex;
|
|
vec2 texcoord;
|
|
};
|
|
struct v2f {
|
|
vec4 vertex;
|
|
vec3 texcoord;
|
|
};
|
|
struct appdata_t {
|
|
vec4 vertex;
|
|
vec3 texcoord;
|
|
};
|
|
|
|
v2f vert( in appdata_t v );
|
|
v2f vert( in appdata_t v ) {
|
|
v2f o;
|
|
o.vertex = ( gl_ModelViewProjectionMatrix * v.vertex );
|
|
o.texcoord = v.texcoord;
|
|
return o;
|
|
}
|
|
void main() {
|
|
v2f xl_retval;
|
|
appdata_t xlt_v;
|
|
xlt_v.vertex = vec4( gl_Vertex);
|
|
xlt_v.texcoord = vec3( gl_MultiTexCoord0);
|
|
xl_retval = vert( xlt_v);
|
|
gl_Position = vec4( xl_retval.vertex);
|
|
gl_TexCoord[0] = vec4( xl_retval.texcoord, 0.0);
|
|
}
|