TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A new way of rendering particles

100 pointsby plurbyover 9 years ago

8 comments

CyberDildonicsover 9 years ago
This is extremely unlikely to be a good technique (and it isn&#x27;t new) but here are two alternatives. Even in the demo video, beneath the lens flares and other excess, the particles are aliasing like crazy.<p>First of all, particles like this are usually only a few pixels in size, so the shape doesn&#x27;t really matter as much as the area. Because of this, I don&#x27;t think there is much gained, but there is a lot lost since it aliases so badly.<p>Renderman actually creates particles as two bilinear patches that make up the same shape as the intersection given by these two triangles. You could do the same thing with a quad strip, which would still also take only 6 vertices. The gpu will deal with the quads itself, possibly by creating two triangles for each quad. This is very unlikely to be a performance hit since it does not affect shading.<p>A second way of creating a semi-transparent particle would be make a triangle strip that rotates around one center point. The center point has an alpha of 1, the outer points have an alpha of 0. The interpolation takes care of gradient transparency to the edges, and even with 5 outer vertices the shape + gradient should easily look good enough to hold up while taking up around 16 pixels.<p>Shadows - the best way in these situations to control shadows is usually to scale down the particle (or hair). Remember that the shape or look on a micro scale doesn&#x27;t matter as much as the integral of the area * integral of the transparency.
评论 #10966064 未加载
zeta0134over 9 years ago
Seems like a very simple expansion on this technique would be to keep a rolling framebuffer, and blend the last particle draw with the current one. This would remove the flickering, display the fake alpha properly for still screenshots, and work for variable framerate.<p>Assuming your GPU will let you hold onto a previous frame&#x27;s draw result (of just the particles) and blend it relatively cheaply with the new one, it wouldn&#x27;t cost very much to implement. One full framebuffer blend should be much, much cheaper than blending the individual dots.
评论 #10963392 未加载
luxover 9 years ago
This is really cool. I&#x27;m curious how this will look on a Gear VR, since those run at 60fps and require every optimization they can get to maintain that on a cell phone.
BatFastardover 9 years ago
I have been looking for a better particle. Thanks! One strange advantage to putting new feature off, better way of doing them suddenly appear.
emcqover 9 years ago
I really like this. It would be nice to see some benchmarks versus a quad based solution where the quad is tessellated in a geometry shader with a fragment shader drawing the particle or using a texture. My guess would be that the bottleneck might be pcie but my knowledge of the gpu performance is a little outdated.
fizixerover 9 years ago
How is it any different from the idea of voxels?
评论 #10963504 未加载
Danieruover 9 years ago
If this sounds interesting to you I suggest also checking out TXAA. It exploits a similar concept to get high quality cheap AA.
deepnetover 9 years ago
This brilliantly insightful heuristic will work well for showing off point clouds in WebGL.