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

20 lines
641 B
Text
Raw Normal View History

2015-10-10 01:13:07 -04:00
#version 300 es
out lowp vec4 _fragData;
vec4 xll_tex2DArray(sampler2DArray s, vec3 coord) { return texture (s, coord); }
vec4 xll_tex2DArrayBias(sampler2DArray s, vec4 coord) { return texture (s, coord.xyz, coord.w); }
uniform lowp sampler2DArray myarr;
lowp vec4 xlat_main( in highp vec4 uv ) {
highp vec4 s = xll_tex2DArray( myarr, uv.xyz);
highp vec4 sswiz = xll_tex2DArray( myarr, uv.xyw);
highp vec4 sbias = xll_tex2DArrayBias( myarr, vec4( uv.xyz, 1.5));
highp vec4 slod = textureLod(myarr, uv.xyz, 2.5);
return (((s + sswiz) + sbias) + slod);
}
in highp vec4 uv;
void main() {
_fragData = xlat_main(uv);
}