O'Reilly logo

WebGL Beginner's Guide by Brandon Jones, Diego Cantor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — blending workbench

  1. Open the file ch6_Blending.html in your HTML5 Internet browser. You will see an interface like the one shown in the following screenshot:
    Time for action — blending workbench
  2. This interface has most of the parameters that allow you to configure alpha blending. The settings by default are source: gl.SRC_ALPHA and destination: gl.ONE_MINUS_SRC_ALPHA. These are the parameters for interpolative blending. Which slider do you need to use in order to change the scaling factor for interpolative blending? Why?
  3. Change the sphere alpha slider to 0.5. You will see some shadow-like artifacts on the surface of the sphere. This occurs because the sphere back face ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required