bgfx/3rdparty/glsl-optimizer/tests/fragment/derivatives-inES.txt

62 lines
1.3 KiB
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
#extension GL_OES_standard_derivatives : require
float xll_dFdx(float f) {
return dFdx(f);
}
vec2 xll_dFdx(vec2 v) {
return dFdx(v);
}
vec3 xll_dFdx(vec3 v) {
return dFdx(v);
}
vec4 xll_dFdx(vec4 v) {
return dFdx(v);
}
mat2 xll_dFdx(mat2 m) {
return mat2( dFdx(m[0]), dFdx(m[1]));
}
mat3 xll_dFdx(mat3 m) {
return mat3( dFdx(m[0]), dFdx(m[1]), dFdx(m[2]));
}
mat4 xll_dFdx(mat4 m) {
return mat4( dFdx(m[0]), dFdx(m[1]), dFdx(m[2]), dFdx(m[3]));
}
float xll_fwidth(float f) {
return fwidth(f);
}
vec2 xll_fwidth(vec2 v) {
return fwidth(v);
}
vec3 xll_fwidth(vec3 v) {
return fwidth(v);
}
vec4 xll_fwidth(vec4 v) {
return fwidth(v);
}
mat2 xll_fwidth(mat2 m) {
return mat2( fwidth(m[0]), fwidth(m[1]));
}
mat3 xll_fwidth(mat3 m) {
return mat3( fwidth(m[0]), fwidth(m[1]), fwidth(m[2]));
}
mat4 xll_fwidth(mat4 m) {
return mat4( fwidth(m[0]), fwidth(m[1]), fwidth(m[2]), fwidth(m[3]));
}
mediump vec4 xlat_main( in highp vec4 uv );
#line 1
mediump vec4 xlat_main( in highp vec4 uv ) {
lowp vec4 res;
#line 3
res.x = xll_dFdx( uv.x );
res.y = xll_dFdx( uv.y );
res.z = xll_fwidth( uv.z );
res.w = 1.00000;
#line 7
return res;
}
varying highp vec4 xlv_TEXCOORD0;
void main() {
mediump vec4 xl_retval;
xl_retval = xlat_main( vec4(xlv_TEXCOORD0));
gl_FragData[0] = vec4( xl_retval);
}