3 ms·
the shader version is the fastest, but looks like modern art on my smartphone. Like someone scribbled the colors over the circles instead of filling them.
by k__ 9y ago
the shader version is the fastest, but looks like modern art on my smartphone.
Like someone scribbled the colors over the circles instead of filling them.
- K0nserv 9y agoThat's probably an implementation issues that manifests on your hardware called shadow acne/self intersection. It's explained here[0] 0: https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-shading/ligth-and-shadows https://www.scratchapixel.com/lessons/3d-basic-rendering/int...
- k__ 9y agoMade a screenshot: https://imgur.com/a/7J4Da https://imgur.com/a/7J4Da
- jsheard 9y agoThis is probably the culprit: https://github.com/sniklaus/experiment-raytracer/blob/master/shader.js#L11 https://github.com/sniklaus/experiment-raytracer/blob/master... It declares that floats should only be medium precision by default, but those precision specifiers are only followed on mobile platforms. Desktop WebGL implementations just promote everything to high precision so that kind of bug is invisible until you test on mobile.