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

20 lines
471 B
Text
Raw Normal View History

2014-02-11 02:06:13 -05:00
#version 300 es
precision mediump float;
vec4 xll_tex2Dlod(sampler2D s, vec4 coord) {
2014-10-11 15:32:43 -04:00
return textureLod (s, coord.xy, coord.w);
2014-02-11 02:06:13 -05:00
}
uniform sampler2D tex;
2014-10-11 15:32:43 -04:00
mediump vec4 xlat_main (in highp vec4 uv) {
2014-02-11 02:06:13 -05:00
return xll_tex2Dlod( tex, vec4( uv.xy , 0.0, 0.0));
}
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
mediump vec4 r;
r = xlat_main(uvHi);
r += textureLod (tex, uvMed.xy, uvMed.z); // mediump arguments
_fragColor = r;
2014-02-11 02:06:13 -05:00
}