0

I do a simple circle in fragment shader:

float dist = length(gl_PointCoord - 0.5); // distance to center
float circle = smoothstep(0.3, 0.5, dist); // apply smoothing curve

And now I would do some bloom effect around it. Like this: https://i.stack.imgur.com/rIS2o.png

RED
  • 39
  • 2
  • 7

2 Answers2

0

I think what you're looking for is a Radial Gradient. This link looks helpful RadialGradient Shader

0

Please find this nvidia document for the simple glow effect. The basic idea is to

  1. render the scene in the back buffer activate the effect
  2. render some elements of the scene in a FBO
  3. compute the Glow effect
  4. bind the final FBO as a texture and blend this effect with the previously rendered scene in the backbuffer
Stone
  • 1,119
  • 9
  • 17
  • There is an example with bitmap, but I guessing it should be easier for just circle. – RED Dec 11 '16 at 14:07