docs.gl icon indicating copy to clipboard operation
docs.gl copied to clipboard

smoothstep documentation error?

Open pdmeyer opened this issue 5 years ago • 2 comments

hello! the document at http://docs.gl/el3/smoothstep says Results are undefined if edge0 ≥ edge1. i have been working with shaders in max/msp/jitter in GLSL #version 330 and find that if `edge0 > edge1', the result is not undefined, rather the behavior is simply inverted. i am not sure whether this is an error in your documentation or just an eccentricity/enhancement of cycling 74's implementation, but i figured i would report in nonetheless!

pdmeyer avatar Jun 08 '20 20:06 pdmeyer

Undefined behaviour means that it might work on a certain platform, it might not, vendors are free to implement UB however they want. If it works correctly on your machine, that's great, but you can't rely on it being correct on other hardware, because basically anything could happen.

Botondar avatar Jun 12 '20 22:06 Botondar

Understood, thank you!

On Fri, Jun 12, 2020 at 3:34 PM Botondar [email protected] wrote:

Undefined behaviour means that it might work on a certain platform, it might not, vendors are free to implement UB however they want. If it works correctly on your machine, that's great, but you can't rely on it being correct on other hardware, because basically anything could happen.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BSVino/docs.gl/issues/85#issuecomment-643508789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWDUIF3WPBXLXF2RNVXZ33RWKUOBANCNFSM4NYXP3PQ .

pdmeyer avatar Jun 12 '20 22:06 pdmeyer