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

20 lines
613 B
Text

#extension GL_EXT_texture_array : require
vec4 xll_tex2DArray(sampler2DArray s, vec3 coord) { return texture2DArray (s, coord); }
vec4 xll_tex2DArrayBias(sampler2DArray s, vec4 coord) { return texture2DArray (s, coord.xyz, coord.w); }
uniform sampler2DArray myarr;
vec4 xlat_main( in vec4 uv ) {
vec4 s = xll_tex2DArray( myarr, uv.xyz);
vec4 sswiz = xll_tex2DArray( myarr, uv.xyw);
vec4 sbias = xll_tex2DArrayBias( myarr, vec4( uv.xyz, 1.5));
return s + sswiz + sbias;
}
varying vec4 uv;
void main() {
vec4 xl_retval;
xl_retval = xlat_main(uv);
gl_FragData[0] = vec4(xl_retval);
}