1 #include "shaders_common.h"
2 
3 static const char *core_stock_fragment_xmb = GLSL(
4    uniform float time;
5    in vec3 fragVertexEc;
6    vec3 up = vec3(0, 0, 1);
7    out vec4 FragColor;
8 
9    void main()
10    {
11      vec3 X = dFdx(fragVertexEc);
12      vec3 Y = dFdy(fragVertexEc);
13      vec3 normal=normalize(cross(X,Y));
14      float c = (1.0 - dot(normal, up));
15      c = (1.0 - cos(c*c))/3.0;
16      FragColor = vec4(c, c, c, 1.0);
17    }
18 );
19