If on Windows - run webbrowser in OpenGL mode:
chrome.exe --use-angle=gl
in Nvidia-OpenGL this will be red - and different numbers
EXPECTED - both sides same and -511
Minimal shader code in shadertoy format:
#define BUG
float smoothMinEx(float a, float b, float k){
k *= 1.0;
float r = exp2(-a / k) + exp2(-b / k);
#ifdef BUG
return (-k * log2(r));
#else
return -1.*(k * log2(r));
#endif
}
void mainImage(out vec4 O, vec2 U){
U /= iResolution.xy;
O = 100.*vec4( smoothMinEx(0.1,smoothMinEx( U.x, U.y, .1),0.4*0.25) );
}
Confirmed by many ppl with different drivers (Linux drivers version 560-580 range)
I tested in Linux on Nvidia drivers 575 - bug present.
even simpler code:
void mainImage(out vec4 O, vec2 U )
{
float k = .1, v,
r = U.x / iResolution.x; // range [0..1] horizontally
#if 0
v = (-k) * r ; // bug
#else
v = -(k*r);
#endif
O = vec4(-v/k);
// O = -O;
}