mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-04 21:31:11 -05:00
20 lines
641 B
Text
20 lines
641 B
Text
|
#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);
|
||
|
}
|