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

14 lines
414 B
Text
Raw Normal View History

2014-02-11 02:06:13 -05:00
#version 300 es
precision mediump float;
uniform sampler2D tex;
uniform samplerCube cub;
2014-10-11 15:32:43 -04:00
in mediump vec3 uv1;
in highp vec3 uv2;
2014-02-11 02:06:13 -05:00
out vec4 _fragColor;
void main() {
2014-10-11 15:32:43 -04:00
vec4 g1 = textureGrad(tex,uv1.xy,dFdx(uv1.xy),dFdy(uv1.xy)); // mediump UV
vec4 g2 = textureGrad(tex,uv2.xy,dFdx(uv2.xy),dFdy(uv2.xy)); // highp UV
vec4 g3 = textureGrad(tex,uv2.xy,uv1.xy,uv1.xy); // mediump gradient
_fragColor = g1 + g2 + g3;
2014-02-11 02:06:13 -05:00
}