4 ms·
That really is very fast! (I don't know if this is a known compromise of your technique (I couldn't find it mentioned), but I occassionally get a ring of varyi
by tweetle_beetle 3y ago
That really is very fast!
(I don't know if this is a known compromise of your technique (I couldn't find it mentioned), but I occassionally get a ring of varying thickness centred in the render with an inverted coluring to the rest of the pixels, or sometimes a solid colour. It varies is size and comes and goes without an obvious correlation to zoom level.)
- QuadmasterXLII 3y agoYeah, I've been chasing that for a while. I've traced it to subnormal float handling. Here's the scenario: if you multiply the 32 bit float float 1 x 2^-127 by 1/8, you can't get 1x2^-130 because 130 isn't representable in a 8 bit exponent. On the CPU or a modern GPU, this is special cased to result in a "subnormal" float: .125 x 2^-127. However, this adds a ton of extra complexitity to the FPU. Old GPUs just gave up and say "It's zero." WebGL standardized on the old GPU behavior, so a modern GPU running webgl sets a flag to behave like the old GPUs. I'm representing complex numbers as (real_mantissa + i * imag_mantissa) * 2^exp where real_mantissa and imag_mantissa are themselves 32 bit floats, and I can reduce the frequency of the colored rings in my shader by keeping the mantissas around ~1000 instead of ~1 (and reducing the exponent to keep the value the same) so that they are less likely to go subnormal, but I can't seem to get rid of the colored rings entirely. I don't actually know the pathway through the code from subnormal underflow -> colored rings, but if you run a CUDA renderer with the same algorithm, the rings appear when you set the flag for "round subnormal floats to zero."