Error accessing ShaderTech "Draw2DTex" in Shader "Main".
Error linking vertex+pixel shader in technique "Draw2DTex" of shader "Main"
Vertex Shader:
#ifndef GL_ES
#define GL_ES
#endif
//GLSL
#ifdef GL_ES
precision highp float;
precision highp int;
#endif
#define COLOR 0
#ifdef GL_ES
#define HP highp
#define MP mediump
#define LP lowp
#else
#define HP
#define MP
#define LP
#endif
#define PAR uniform
#define VAR varying
#define EPS 0.0001
#define EPSL 0.01
#define PI 3.14159265
#define PI2 6.28318531
#define SBUMP_ZERO 0
#define SBUMP_FLAT 1
#define SBUMP_NORMAL 2
#define FX_NONE 0
#define FX_GRASS 1
#define FX_LEAF 2
#define FX_LEAFS 3
#define FX_BONE 4
#define Sat(x) clamp(x,0.0,1.0)
MP float Sum(MP vec2 v){return v.x+v.y;}
MP float Sum(MP vec3 v){return v.x+v.y+v.z;}
MP float Sum(MP vec4 v){return v.x+v.y+v.z+v.w;}
MP float Sqr(MP float x){return x*x;}
MP vec2 Sqr(MP vec2 x){return x*x;}
MP float Cube(MP float x){return x*x*x;}
HP float Length2(HP vec2 v){return dot(v,v);}
HP float Length2(HP vec3 v){return dot(v,v);}
HP float Length2(HP vec4 v){return dot(v,v);}
MP vec2 Rotate(MP vec2 vec,MP vec2 cos_sin)
{
return vec2(vec.x*cos_sin.x-vec.y*cos_sin.y,
vec.x*cos_sin.y+vec.y*cos_sin.x);
}
MP float LerpR(MP float from,MP float to,MP float v){return(v-from)/(to-from);}
MP float LerpRS(MP float from,MP float to,MP float v){return Sat((v-from)/(to-from));}
LP float LPMax(LP float x,LP float y,LP float z,LP float w){return max(x,max(y,max(z,w)));}
LP float LPMax(LP vec4 v){return LPMax(v.x,v.y,v.z,v.w);}
VAR HP vec2 IO_tex;
PAR HP float VtxHeightmap;
PAR MP float VtxSkinning;
#define ATTR attribute
ATTR HP vec4 ATTR0;
ATTR MP vec3 ATTR9;
ATTR MP vec3 ATTR1;
ATTR MP vec4 ATTR2;
ATTR HP vec2 ATTR3;
ATTR HP vec2 ATTR4;
ATTR HP vec2 ATTR11;
ATTR MP float ATTR10;
ATTR MP vec3 ATTR5;
ATTR MP vec3 ATTR6;
ATTR LP vec4 ATTR8;
ATTR LP vec4 ATTR7;
MP vec3 vtx_nrm(){return ATTR1;}
MP vec3 vtx_tan(){return ATTR2.xyz;}
MP float vtx_tanW(){return ATTR2.w;}
HP vec4 vtx_pos4(){return ATTR0;}
HP vec3 vtx_pos(){return ATTR0.xyz;}
MP vec3 vtx_hlp(){return ATTR9;}
HP vec2 vtx_tex(const bool can_be_heightmap){return(can_be_heightmap&&bool(VtxHeightmap))?ATTR0.xz*vec2(VtxHeightmap,-VtxHeightmap):ATTR3;}
HP vec2 vtx_tex1(){return ATTR4;}
HP vec2 vtx_tex2(){return ATTR11;}
MP ivec3 vtx_bone(){return bool(VtxSkinning)?ivec3(ATTR5):ivec3(0,0,0);}
#ifdef GL_ES
MP vec3 vtx_weight(){MP float w=ATTR6.x/(ATTR6.x+ATTR6.y);return vec3(w,1.0-w,0.0);}
#else
MP vec3 vtx_weight(){return ATTR6;}
#endif
LP vec4 vtx_color(){return ATTR7;}
LP vec4 vtx_material(){return ATTR8;}
MP float vtx_size(){return ATTR10;}
PAR HP vec2 PixSize;
PAR HP vec4 Coords;
void main()
{
gl_Position=vec4(vtx_pos().xy*Coords.xy+Coords.zw,0.0,1.0);
IO_tex=vtx_tex(false);
}
Pixel Shader:
#ifndef GL_ES
#define GL_ES
#endif
//GLSL
#extension GL_ARB_shader_texture_lod:enable
#extension GL_EXT_shader_texture_lod:enable
#extension GL_EXT_shadow_samplers:enable
#ifdef GL_ES
precision lowp float;
precision lowp int;
#define texture2DLod texture2DLodEXT
#define shadow2DProj shadow2DProjEXT
#endif
#define COLOR 0
#ifdef GL_ES
#define HP highp
#define MP mediump
#define LP lowp
#else
#define HP
#define MP
#define LP
#endif
#define PAR uniform
#define VAR varying
#define EPS 0.0001
#define EPSL 0.01
#define PI 3.14159265
#define PI2 6.28318531
#define SBUMP_ZERO 0
#define SBUMP_FLAT 1
#define SBUMP_NORMAL 2
#define FX_NONE 0
#define FX_GRASS 1
#define FX_LEAF 2
#define FX_LEAFS 3
#define FX_BONE 4
#define Sat(x) clamp(x,0.0,1.0)
MP float Sum(MP vec2 v){return v.x+v.y;}
MP float Sum(MP vec3 v){return v.x+v.y+v.z;}
MP float Sum(MP vec4 v){return v.x+v.y+v.z+v.w;}
MP float Sqr(MP float x){return x*x;}
MP vec2 Sqr(MP vec2 x){return x*x;}
MP float Cube(MP float x){return x*x*x;}
HP float Length2(HP vec2 v){return dot(v,v);}
HP float Length2(HP vec3 v){return dot(v,v);}
HP float Length2(HP vec4 v){return dot(v,v);}
MP vec2 Rotate(MP vec2 vec,MP vec2 cos_sin)
{
return vec2(vec.x*cos_sin.x-vec.y*cos_sin.y,
vec.x*cos_sin.y+vec.y*cos_sin.x);
}
MP float LerpR(MP float from,MP float to,MP float v){return(v-from)/(to-from);}
MP float LerpRS(MP float from,MP float to,MP float v){return Sat((v-from)/(to-from));}
LP float LPMax(LP float x,LP float y,LP float z,LP float w){return max(x,max(y,max(z,w)));}
LP float LPMax(LP vec4 v){return LPMax(v.x,v.y,v.z,v.w);}
VAR HP vec2 IO_tex;
#define AlphaTest(alpha) if(alpha+MaterialColor().a<1.0)discard
PAR sampler2D Col,Col1,Col2,Col3,
Nrm,Nrm1,Nrm2,Nrm3,
Lum;
PAR samplerCube Rfl;
PAR MP float AllowBackFlip;
#define BackFlip(dir) {if(gl_FrontFacing==false)dir*=AllowBackFlip;}
struct ViewportClass
{
HP float from,range;
HP vec2 clamp_min,clamp_max,center,size,size_fov_tan;
HP vec4 FracToPosXY,ScreenToPosXY,PosToScreen;
};
PAR ViewportClass Viewport;
HP vec2 ViewportClamp(HP vec2 screen,const bool do_clamp){return do_clamp?clamp(screen,Viewport.clamp_min,Viewport.clamp_max):screen;}
PAR LP vec4 Color[4];
void main()
{
#if COLOR!=0
gl_FragColor=texture2D(Col,IO_tex)*Color[0]+Color[1];
#else
gl_FragColor=texture2D(Col,IO_tex);
#endif
}