News for hackers. Stuff that matters.
Re:Show HN: Physically accurate black hole you can put in yo... by nnevatie on Monday July 27, 2026 @06:32AM (#49067545)
> https://blackhole.plav.in/

The lines in the demo look upscaled and aliased for some reason.

Re:Show HN: Physically accurate black hole you can put in yo... by aplavin on Monday July 27, 2026 @03:52PM (#49074755)
Could you please share a screenshot so that I investigate what actually happens? I tested on a few different devices, but far from anything extensive.
Re:Show HN: Physically accurate black hole you can put in yo... by nnevatie on Wednesday July 29, 2026 @06:47AM (#49095706)
This is on Chrome/Win11:

https://snipboard.io/W8SXYm.jpg

Re:Show HN: Physically accurate black hole you can put in yo... by aplavin on Saturday August 01, 2026 @04:31PM (#49138168)
Hmmm I think I see what's happening here. Basically, all devices I tested (laptops/phones/tablets) seem to have small pixel size, and to save on compute power for weaker devices I decided to render with half as many pixels as the screen has, letting the browser upscale the result. In your case, pixels are probably quite a bit larger, and half-res rendering has these prominent artifacts.

Can you try if increasing "render scale" in params->display helps?

Re:Show HN: Physically accurate black hole you can put in yo... by nnevatie on Monday August 03, 2026 @01:44AM (#49151652)
Setting render scale to 1 definitely helped - the aliasing from the lines is gone.

The rest of the circular aliasing could likely be fixed by requesting MSAA, so e.g.:

renderer = new THREE.WebGLRenderer({ alpha: true, antialias: true, powerPreference: 'high-performance', })

Re:Show HN: Physically accurate black hole you can put in yo... by aplavin on Monday August 03, 2026 @09:09PM (#49163299)
Would MSAA compute more samples, effectively multiplying shader computation? Ideally, it should be something adaptive, to the number of pixels/device compute power, eg compute 2x smaller resolution on phones/retina, compute 1x resolution on larger-pixel screens, and maybe even 1x + MSAA beyond some pixel sizes... Just wanted to avoid reinventing these heuristics.