mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-12 09:11:18 -05:00
67 lines
1.6 KiB
Text
67 lines
1.6 KiB
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 pos;
|
|
vec2 uv;
|
|
};
|
|
struct appdata_base {
|
|
vec4 vertex;
|
|
vec3 normal;
|
|
vec4 texcoord;
|
|
};
|
|
uniform sampler2D _MainTex0;
|
|
uniform sampler2D _MainTex1;
|
|
uniform sampler2D _MainTex10;
|
|
uniform sampler2D _MainTex11;
|
|
uniform sampler2D _MainTex12;
|
|
uniform sampler2D _MainTex13;
|
|
uniform sampler2D _MainTex14;
|
|
uniform sampler2D _MainTex15;
|
|
uniform sampler2D _MainTex2;
|
|
uniform sampler2D _MainTex3;
|
|
uniform sampler2D _MainTex4;
|
|
uniform sampler2D _MainTex5;
|
|
uniform sampler2D _MainTex6;
|
|
uniform sampler2D _MainTex7;
|
|
uniform sampler2D _MainTex8;
|
|
uniform sampler2D _MainTex9;
|
|
vec4 frag( in v2f i );
|
|
vec4 frag( in v2f i ) {
|
|
vec4 col;
|
|
col = texture2D( _MainTex0, i.uv);
|
|
col += texture2D( _MainTex1, i.uv);
|
|
col += texture2D( _MainTex2, i.uv);
|
|
col += texture2D( _MainTex3, i.uv);
|
|
col += texture2D( _MainTex4, i.uv);
|
|
col += texture2D( _MainTex5, i.uv);
|
|
col += texture2D( _MainTex6, i.uv);
|
|
col += texture2D( _MainTex7, i.uv);
|
|
col += texture2D( _MainTex8, i.uv);
|
|
col += texture2D( _MainTex9, i.uv);
|
|
col += texture2D( _MainTex10, i.uv);
|
|
col += texture2D( _MainTex11, i.uv);
|
|
col += texture2D( _MainTex12, i.uv);
|
|
col += texture2D( _MainTex13, i.uv);
|
|
col += texture2D( _MainTex14, i.uv);
|
|
col += texture2D( _MainTex15, i.uv);
|
|
return col;
|
|
}
|
|
void main() {
|
|
vec4 xl_retval;
|
|
v2f xlt_i;
|
|
xlt_i.pos = vec4(0.0);
|
|
xlt_i.uv = vec2( gl_TexCoord[0]);
|
|
xl_retval = frag( xlt_i);
|
|
gl_FragData[0] = vec4( xl_retval);
|
|
}
|