title: How to make a retro/neon/glow effect using shaders?
body: <p>Let's say the concept is to create a map consisting of cubes with a neon aesthetic, such as:<a href="https://i.stack.imgur.com/2o0Bj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2o0Bj.jpg" alt="Example"></a> </p>
  
  <p>Currently I have this vertex shader:</p>
  
  <pre><code>// Uniforms
  uniform mat4 u_projection;
  uniform mat4 u_view;
  uniform mat4 u_model;
  
  // Vertex atributes
  in vec3 a_position;
  in vec3 a_normal;
  in vec2 a_texture;
  
  vec3 u_light_direction = vec3(1.0, 2.0, 3.0);
  
  // Vertex shader outputs
  out vec2 v_texture;
  out float v_intensity;
  
  void main()
  {
      vec3 normal = normalize((u_model * vec4(a_normal, 0.0)).xyz);
      vec3 light_dir = normalize(u_light_direction);
      v_intensity = max(0.0, dot(normal, light_dir));
      v_texture = a_texture;
      gl_Position = u_projection * u_view * u_model * vec4(a_position, 1.0);
  }
  </code></pre>
  
  <p>And this pixel shader:</p>
  
  <pre><code>in float v_intensity;
  in vec2 v_texture;
  
  uniform sampler2D u_texture;
  
  out vec4 fragColor;
  
  void main()
  {
    fragColor = texture(u_texture, v_texture) * vec4(v_intensity, v_intensity, v_intensity, 1.0);
  }
  </code></pre>
  
  <p>How would I use this to create a neon effect such as in the example for 3D cubes? The cubes are simply models with a mesh/material. The only change would be to set the material color to black and the outlines to a bright pink or blue (maybe with a glow).</p>
  
  <p>Any help is appreciated. :)</p>