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

60 lines
1.2 KiB
Plaintext
Raw Normal View History

2012-04-04 07:30:07 +04:00
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]));
}
vec4 xlat_main( in vec4 uv );
#line 1
vec4 xlat_main( in vec4 uv ) {
vec4 res;
#line 3
res.x = xll_dFdx(uv.x);
res.y = xll_dFdx(uv.y);
res.zw = xll_fwidth(uv.xy);
#line 7
return res;
}
varying vec4 xlv_TEXCOORD0;
void main() {
vec4 xl_retval;
xl_retval = xlat_main( vec4(xlv_TEXCOORD0));
gl_FragData[0] = vec4( xl_retval);
}