2012-10-07 23:41:18 -04:00
|
|
|
#extension GL_EXT_shader_texture_lod : enable
|
|
|
|
#extension GL_EXT_shadow_samplers : enable
|
2015-04-03 02:30:48 -04:00
|
|
|
lowp vec4 impl_low_texture2DProjLodEXT(lowp sampler2D sampler, highp vec4 coord, mediump float lod)
|
|
|
|
{
|
|
|
|
#if defined(GL_EXT_shader_texture_lod)
|
|
|
|
return texture2DProjLodEXT(sampler, coord, lod);
|
|
|
|
#else
|
|
|
|
return texture2DProj(sampler, coord, lod);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
lowp vec4 impl_low_texture2DProjLodEXT(lowp sampler2D sampler, highp vec3 coord, mediump float lod)
|
|
|
|
{
|
|
|
|
#if defined(GL_EXT_shader_texture_lod)
|
|
|
|
return texture2DProjLodEXT(sampler, coord, lod);
|
|
|
|
#else
|
|
|
|
return texture2DProj(sampler, coord, lod);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2012-10-07 23:41:18 -04:00
|
|
|
uniform sampler2D tex;
|
2014-02-11 02:06:13 -05:00
|
|
|
uniform lowp sampler2DShadow shadowmap;
|
|
|
|
varying highp vec4 uv;
|
2012-10-07 23:41:18 -04:00
|
|
|
void main ()
|
|
|
|
{
|
2014-10-11 15:32:43 -04:00
|
|
|
lowp vec4 c_1;
|
|
|
|
c_1 = (texture2DProj (tex, uv) + texture2DProj (tex, uv.xyz));
|
2015-04-03 02:30:48 -04:00
|
|
|
c_1 = (c_1 + impl_low_texture2DProjLodEXT (tex, uv, 1.0));
|
|
|
|
c_1 = (c_1 + impl_low_texture2DProjLodEXT (tex, uv.xyz, 1.0));
|
2014-10-11 15:32:43 -04:00
|
|
|
c_1 = (c_1 + vec4(shadow2DEXT (shadowmap, uv.xyz)));
|
|
|
|
c_1 = (c_1 + vec4(shadow2DProjEXT (shadowmap, uv)));
|
|
|
|
gl_FragColor = c_1;
|
2012-10-07 23:41:18 -04:00
|
|
|
}
|
|
|
|
|
2014-02-11 02:06:13 -05:00
|
|
|
|
2014-10-11 15:32:43 -04:00
|
|
|
// stats: 5 alu 6 tex 0 flow
|
|
|
|
// inputs: 1
|
|
|
|
// #0: uv (high float) 4x1 [-1]
|
|
|
|
// textures: 2
|
|
|
|
// #0: tex (low 2d) 0x0 [-1]
|
2015-10-10 01:13:07 -04:00
|
|
|
// #1: shadowmap (low 2dshadow) 0x0 [-1]
|