But according to the OpenGL docs (and the documentation for the smoothstep function contained in the Book of Shaders) this function requires edge1 to be strictly greater than edge0. Being new to shaders, this confused me and I had to mess around with it to figure out what was actually happening.
Hi, the first code example in Chapter 05 contains a usage of smoothstep which should produce undefined output according to the OpenGL docs.
It looks like, on my hardware, the result ends up being identical to:
But according to the OpenGL docs (and the documentation for the smoothstep function contained in the Book of Shaders) this function requires
edge1
to be strictly greater thanedge0
. Being new to shaders, this confused me and I had to mess around with it to figure out what was actually happening.