bgfx/3rdparty/glsl-optimizer/tests/fragment/tex2dshadow-inES3.txt

24 lines
640 B
Text
Raw Normal View History

2014-02-11 02:06:13 -05:00
#version 300 es
precision mediump float;
float xll_shadow2D(sampler2DShadow s, vec3 coord) { return texture (s, coord); }
float xll_shadow2Dproj(sampler2DShadow s, vec4 coord) { return textureProj (s, coord); }
uniform sampler2DShadow shadowmap;
2014-10-11 15:32:43 -04:00
lowp vec4 xlat_main (in highp vec4 uv) {
2014-02-11 02:06:13 -05:00
lowp float s1;
lowp float s2;
s1 = xll_shadow2D( shadowmap, uv.xyz);
s2 = xll_shadow2Dproj( shadowmap, uv);
#line 8
return vec4( (s1 + s2));
}
2014-10-11 15:32:43 -04:00
in highp vec4 uvHi;
in mediump vec4 uvMed;
2014-02-11 02:06:13 -05:00
out vec4 _fragColor;
void main() {
2014-10-11 15:32:43 -04:00
lowp vec4 r;
r = xlat_main(uvHi);
r.x += texture (shadowmap, uvMed.xyz);
_fragColor = r;
2014-02-11 02:06:13 -05:00
}