4 [vertex shader passthrough]
7 /* SDL2 prior to 12156:e5a666405750 (Aug 28) would render a bunch of
8 * its contents using cos/sin in the VS to handle a user-passed angle
9 * value (See SDL's RenderCopyEx, for example). If our error at angle
10 * == 0.0 is too much, we'll slightly rotate the images even with
16 float sin_err = abs(sin(angle) - 0.0);
17 float cos_err = abs(cos(angle) - 1.0);
18 /* Allow a tolerance of half a pixel of error at a 2048x2048
19 * window (viewport is from -1 to 1).
21 float tolerance = 2.0 / 2048.0 / 2.0;
23 gl_FragColor = vec4(sin_err >= tolerance,
24 sin_err < tolerance && cos_err < tolerance,
30 uniform float angle 0.0
32 probe all rgba 0.0 1.0 0.0 0.0