bgfx/3rdparty/glsl-optimizer/tests/fragment/tex2dgrad-inES3.txt
2014-10-11 12:32:43 -07:00

13 lines
414 B
Text

#version 300 es
precision mediump float;
uniform sampler2D tex;
uniform samplerCube cub;
in mediump vec3 uv1;
in highp vec3 uv2;
out vec4 _fragColor;
void main() {
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;
}