Game Development Reference
In-Depth Information
In our example, to keep things simple, we add scan lines to our scene. We would like
our scene to appear similar to the following screenshot:
If you notice in the preceding screenshot, we have rendered the scene without
applying filters and another one with filters. The scene in the lower section of the
preceding screenshot has a shade of green with alternate scan lines with dark and
light green colors. We used a very simple algorithm to produce this effect so that our
focus is on how we do it in WebGL and not in the shader algorithm. You can use
many complex algorithms in shaders to produce this effect such as edge detection
using the Sobel operator ( http://en.wikipedia.org/wiki/Sobel_operator ).
 
Search WWH ::




Custom Search