Skip to content

Instantly share code, notes, and snippets.

View redblobgames's full-sized avatar
🥰

Amit Patel redblobgames

🥰
View GitHub Profile
@redblobgames
redblobgames / .block
Last active September 30, 2022 16:42 — forked from HarryStevens/.block
Voronoi Jiggle
license: gpl-3.0
@redblobgames
redblobgames / README.md
Last active January 2, 2019 17:27 — forked from 1wheel/README.md
blend-alpha

(redblobgames updated this block to use premultiplied alpha - http://apoorvaj.io/alpha-compositing-opengl-blending-and-premultiplied-alpha.html)

I can't figure out why points with gl_FragColor = vec4(255, 255, 255, .1); get darker and then lighter when overlaid with increasing density. (note: it should be vec4(1.0, 1.0, 1.0, 0.1) not 0-255 --redblobgames)

I'm using these blending settings:

blend: {
  enable: true,
 func: {