bgfx/3rdparty/glsl-optimizer/tests/fragment/texProj-outES.txt
2015-10-09 22:13:07 -07:00

42 lines
1.2 KiB
Plaintext

#extension GL_EXT_shader_texture_lod : enable
#extension GL_EXT_shadow_samplers : enable
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
}
uniform sampler2D tex;
uniform lowp sampler2DShadow shadowmap;
varying highp vec4 uv;
void main ()
{
lowp vec4 c_1;
c_1 = (texture2DProj (tex, uv) + texture2DProj (tex, uv.xyz));
c_1 = (c_1 + impl_low_texture2DProjLodEXT (tex, uv, 1.0));
c_1 = (c_1 + impl_low_texture2DProjLodEXT (tex, uv.xyz, 1.0));
c_1 = (c_1 + vec4(shadow2DEXT (shadowmap, uv.xyz)));
c_1 = (c_1 + vec4(shadow2DProjEXT (shadowmap, uv)));
gl_FragColor = c_1;
}
// stats: 5 alu 6 tex 0 flow
// inputs: 1
// #0: uv (high float) 4x1 [-1]
// textures: 2
// #0: tex (low 2d) 0x0 [-1]
// #1: shadowmap (low 2dshadow) 0x0 [-1]