News for hackers. Stuff that matters.
Re:Rendering my (billiard) balls in a fragment shader by rwmj on Sunday September 11, 2022 @03:56AM (#32797676)
I'm surprised you'd have to define pi in a fragment shader at all. Surely such a commonly used constant would be defined in the language/headers already?
Re:Rendering my (billiard) balls in a fragment shader by cperciva on Sunday September 11, 2022 @04:03AM (#32797724)
You should always define Pi in your code, in case the value ever changes.
Re:Rendering my (billiard) balls in a fragment shader by sysrpl on Sunday September 11, 2022 @04:13AM (#32797765)
I've always though about that fact myself. Can somone find the answer to why didn't the GLSL designers / video card driver people make PI built into their language?